哪位大虾有c#编写的收发Email源代码,发给我 邮箱:[email protected]

解决方案 »

  1.   

    MailMessage newmail = new MailMessage();
    newmail.From="*********@citiz.net";
    newmail.BodyFormat=MailFormat.Html;
    newmail.Priority = MailPriority.High;
    newmail.To="[email protected]";
    newmail.Subject=subject;
    newmail.Body=body;
    newmail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate","1"); //basic authentication 
    newmail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "username");//set your username here 
    newmail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "password");//set your password here
    MailAttachment attachment = new MailAttachment(saveName);
    newmail.Attachments.Add(attachment);
    SmtpMail.SmtpServer="www.citiz.net";
    SmtpMail.Send(newmail);这是发送的
      

  2.   

    ref:
    http://www.codeproject.com/info/search.asp?cats=3&cats=4&cats=5&cats=6&searchkw=pop+smtp&Submit1=Search&author=&sd=15+Nov+1999&ed=9+Jan+2007ps:
    search "pop" or "smtp" in www.codeproject.com to get samples
      

  3.   

    to:cherry_j(慈禧)
       SmtpMail.SmtpServer="www.citiz.net";这句是不是应该改为SmtpMail.SmtpServer="localhost";
     编译通不过,iis还需要配置smtp吗?
      

  4.   

    to:cherry_j(慈禧)
       SmtpMail.SmtpServer="www.citiz.net";这句是不是应该改为SmtpMail.SmtpServer="localhost";
     编译通不过,iis还需要配置smtp吗?
    ----------------------------
    SmtpMail.SmtpServer="127.0.0.1或者你的内网IP";是要有smtp服务
      

  5.   

    我也想要一份....email:[email protected]
      

  6.   

    MSDN 的System.Net.Mail命名空间里有很详细的例子 看看有帮助没