回覆列表
  • 1 # 使用者5253322899700

    nt client = new SmtpClient("smtp.163.com");

    client.UseDefaultCredentials = false;

    client.Credentials = new System.Net.NetworkCredential("[email protected]", "cwy_speed");

    client.DeliveryMethod = SmtpDeliveryMethod.Network;

    MailAddress addressFrom = new MailAddress("[email protected]", "張三");

    MailAddress addressTo = new MailAddress(strto, "李四");

    System.Net.Mail.MailMessage message = new MailMessage(addressFrom, addressTo);

    message.Sender = new MailAddress("[email protected]");

    message.BodyEncoding = System.Text.Encoding.UTF8;

    message.IsBodyHtml = true;

    client.Send(message);

    (以上程式碼是可以正確執行的,並且是可以傳送出去的。)

  • 中秋節和大豐收的關聯?
  • 水中的重金屬怎麼可以除去?