내 웹 사이트에서 전자 메일을 보내는 데 사용할 수있는 일반 사서함이 있습니다. 작동을 멈추고 예외를 throw합니다. 다음은 오류의 스크린 샷입니다.SMTP 예외로 인해 전자 메일을 보내지 못했습니다.
error http://img7.imageshack.us/img7/7227/42097647.png
코드는 잘 작동하면 내가 확인할 수있는 방법,
protected void Submit_Click(object sender, EventArgs e)
{
if (ValidateBox.Text == "6")
{
MailMessage message = new MailMessage();
message.From = new MailAddress(EmailBox.Text.ToString());
message.To.Add(new MailAddress("[email protected]"));
message.Subject = "Message via CAM Website General Mailbox";
string body = "Name: " + NameBox.Text.ToString() + Environment.NewLine + Environment.NewLine +
"Home Tel: " + HomeTelBox.Text.ToString() + Environment.NewLine + Environment.NewLine +
"Work Tel: " + WorkTelBox.Text.ToString() + Environment.NewLine + Environment.NewLine +
"Comment/Question: " + CommentBox.Text.ToString();
message.Body = body;
SmtpClient client = new SmtpClient();
client.Send(message);
Response.Redirect("~/Thank-You.aspx");
}
else
{
Label1.Visible = true;
}
}
이 내 webconfig에 언급 된 SMTP 클라이언트에서 오류가 될 수있다? 감사.