send email in ASP.net2.0

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
 
S

Sergey Gorbachev

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.
 
G

Guest

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top