Asp.net 1.1 Email Issue

Discussion in '.NET' started by Saad, Dec 11, 2007.

  1. Saad

    Saad

    Joined:
    Oct 25, 2007
    Messages:
    2
    Location:
    Karachi
    Hi,

    I want to send email using asp.net 1.1 with C# , my code is

    MailMessage msg=new MailMessage();
    msg.To=toaddress;
    msg.From=fromaddress;
    msg.Subject="Test";
    msg.Body="Test body";
    SmtpMail.SmtpServer=mySmtpServer;
    SmtpMail.Send(msg);

    The same code works in asp.net 2.0 and even in c# 1.1 windows application. But when I try to use this code in asp.net 1.1 I get this error:

    System.Runtime.InteropServices.COMException: The transport failed to connect to the server

    Please help,
    Thank You
    Saad, Dec 11, 2007
    #1
    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.
Similar Threads
  1. Mart
    Replies:
    2
    Views:
    558
  2. sweetpotatop@yahoo.com

    ASP.NET outgoing email goes to Junk-Email

    sweetpotatop@yahoo.com, Apr 24, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    484
    Eric Layman
    Apr 25, 2007
  3. da

    ASP Email Issue

    da, Dec 10, 2004, in forum: ASP General
    Replies:
    1
    Views:
    120
    Steven Burn
    Dec 10, 2004
  4. Joseph Clark
    Replies:
    2
    Views:
    237
    Dave Lilley
    Oct 14, 2010
  5. NickH
    Replies:
    9
    Views:
    169
    Randy Webb
    Jan 22, 2004
Loading...

Share This Page