关注楼主的问题.用c#.net发邮件,是不是要再加一个邮件服务器

解决方案 »

  1.   

    protected void Send_Email(Object Sender, EventArgs e) 
    {

    MailMessage mail = new MailMessage();
    mail.To = "[email protected]";
    mail.From = "[email protected]";
    mail.BodyFormat = MailFormat.Html;
    mail.Subject = "subject";
    mail.Body = "body";
    SmtpMail.SmtpServer="tom.com"; SmtpMail.Send(mail); Response.Flush();
    Message.Text = "Message Sent...<br><br>"+"<a href=\"sendMail.aspx\">Go Back</a>";
    }
      

  2.   

    you should set SmtpMail.SmtpServer="ip of localhost" ;
    and set SmtpMail.SmtpServer="ip of the proxy", if you get on internet via a proxy server