-1
protected void Button1_Click(object sender, EventArgs e)
{
MailMessage message = new MailMessage("[email protected]", "[email protected]", "header", "detail");
message.IsBodyHtml = true;
SmtpClient client = new SmtpClient("smtp.gmail.com", 587);
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.EnableSsl = true;
client.Credentials = new System.Net.NetworkCredential("[email protected]", "1234");
client.Send(message);
Label1.Text = "SuccessFull";
}
錯誤這是錯誤消息我得到:我想發送電子郵件,但在asp.net C#
服務不可用,關閉傳輸通道。服務器響應是:服務器繁忙,關閉傳輸通道。以後再試
您應該查看[通過Gmail在.NET中發送電子郵件](http://stackoverflow.com/q/32260/205233)和相關帖子上的答案。 – Filburt
[通過Gmail在.NET中發送郵件]的可能副本(http://stackoverflow.com/questions/32260/sending-email-in-net-through-gmail) – VDWWD