send email in ASP.net2.0

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I've been having a prlbem sending an email using ASP.net 2.0 I can send an
email if “To†address is hotmail, gmail or yahoo but not other addresses.
Does anyone know how I can resolve this problem?

Thank you very much in advance,
Chieko
 
I've been having a prlbem sending an email using ASP.net 2.0 I can send
an
email if "To" address is hotmail, gmail or yahoo but not other addresses.
Does anyone know how I can resolve this problem?

You can try another SMTP server. This is not necessarily to user your
provider's server.
 
I tried that but I have a same result. Now my co-worker told me to add the
following code in web.config.

<system.net>
<mailSettings>
<smtp deliveryMethod="PickupDirectoryFromIis">
<network host="host.com"
port="25"
defaultCredentials="true" />
</smtp>
</mailSettings>
</system.net>

But I got the error "System.Net.Mail.SmtpException: Cannot get IIS pickup
directory.
at System.Net.Mail.IisPickupDirectory.GetPickupDirectory()
at System.Net.Mail.SmtpClient.Send(MailMessage message)"

I can't figure out why I get the error even though I am using the exactly
same code. Does anyone know what's going on?

Thank you very much in advance,
Chieko
 
Thanks for people who gave me suggestions. It turned out that " <identity
impersonate="true"/>" in web.config gave me the error. I don't know why it
causes the error, but it works fine after I deleted the line.

Regards,
Chieko
 
Back
Top