Sending Mail via System.Net.Mail problem

Discussion in 'ASP .Net' started by =?Utf-8?B?T3Bh?=, Jan 25, 2006.

  1. 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("", "","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
    =?Utf-8?B?T3Bh?=, Jan 25, 2006
    #1
    1. Advertising

  2. =?Utf-8?B?T3Bh?=

    sloan Guest

    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 = "";

    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.









    "Opa" <> wrote in message
    news:<>...

    > 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("", "","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


    >


    >









    "Opa" <> wrote in message
    news:...
    > 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("", "","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
    >
    >
    sloan, Jan 25, 2006
    #2
    1. Advertising

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



    "sloan" wrote:

    >
    > 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 = "";
    >
    > 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.
    >
    >
    >
    >
    >
    >
    >
    >
    >
    > "Opa" <> wrote in message
    > news:<>...
    >
    > > 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("", "","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

    >
    > >

    >
    > >

    >
    >
    >
    >
    >
    >
    >
    >
    > "Opa" <> wrote in message
    > news:...
    > > 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("", "","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
    > >
    > >

    >
    >
    >
    =?Utf-8?B?T3Bh?=, Jan 26, 2006
    #3
  4. =?Utf-8?B?T3Bh?=

    sachya Guest

    Disabling Norton Antivirus should resolve this. If it , I don't exactly
    know the reason.
    sachya, Jan 31, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page