/// <summary>
    /// Register后发送邮件
    /// </summary>
    /// <param name="email"></param>
    /// <param name="customer"></param>
    public void RegisterSend(string email,string name)
    {
        MailMessage m_message = new MailMessage();
        m_message.From = new MailAddress("[email protected]", "Customer Services");
        m_message.To.Add(new MailAddress(email));
        m_message.Subject = " a.com – Registration Confirmed";        
        m_message.Body = "Dear"+ name+":<br>mail body";
        m_message.IsBodyHtml = true;
        SmtpClient m_smtpClient = new SmtpClient();
        m_smtpClient.Send(m_message);
    }

解决方案 »

  1.   

    m_message.From = new MailAddress("[email protected]", "Customer Services");这句话里的两个参数是什么意思呀??
    自定义服务是要安装什么吗?
      

  2.   

    服务器开启smtpweb.config加上
    <system.net>
    <mailSettings>
    <smtp from="用来发送邮件的邮箱// [email protected]">
    <network host="发送邮件的服务器//mail.163.com" password="邮箱密码" port="25" userName="用户名" defaultCredentials="false"/>
    </smtp>
    </mailSettings>
    </system.net>
      

  3.   

    m_message.From = new MailAddress("[email protected]", "Customer Services");
    收到邮件时显示发邮件的邮箱名