Sending Mail via System.Net.Mail problem

G

Guest

Hi,

I'm trying to send mail from my ASP.NET application using the new
System.Net.Mail classes.
The code is fairly basic

string SMTPServer = "smtp.atlanticbb.net";
SmtpClient client = new SmtpClient(SMTPServer);
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.Send("(e-mail address removed)", "(e-mail address removed)","test", "test");

I get no errors, but I never recieve the message.

My environment is a development machine (XP pro)
the smtp server I'm using comes from my ISP.

I have norton antivirus, and it does indicate that the message was sent, but
I don't receive anything.

Any thoughts?

Thanks
 
S

sloan

Try adding some basic authenitication. I have this issue with road runner
email.



http://blogs.wwwcoder.com/pradeepd/archive/2004/01/28/236.aspx







int cdoBasic = 1;
string username = "(e-mail address removed)";

mail.Fields.Add("<http://schemas.microsoft.com/cdo/configuration/smtpauthent
icate>, cdoBasic);
mail.Fields.Add("<http://schemas.microsoft.com/cdo/configuration/sendusernam
e>, username);






This is not complete code, just the extra parts you may need.









Hi,

I'm trying to send mail from my ASP.NET application using the new
System.Net.Mail classes.
The code is fairly basic

string SMTPServer = "smtp.atlanticbb.net";
SmtpClient client = new SmtpClient(SMTPServer);
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.Send("(e-mail address removed)", "(e-mail address removed)","test", "test");

I get no errors, but I never recieve the message.

My environment is a development machine (XP pro)
the smtp server I'm using comes from my ISP.

I have norton antivirus, and it does indicate that the message was sent, but

I don't receive anything.

Any thoughts?
 
G

Guest

Thanks for the reply. I tried adding the DefaultNetworkCredentials, but
I still get no emails delivered to me. Any other ideas?
 
S

sachya

Disabling Norton Antivirus should resolve this. If it , I don't exactly
know the reason.
 

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
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top