HOME > .NET Framework > Forum > ทำส่งเมล์ไม่ได้ครับ ทำตามแล้ว ก็ยัง System.Runtime.InteropServices.COMException: The "SendUsing" configuration value is invalid.
ทำส่งเมล์ไม่ได้ครับ ทำตามแล้ว ก็ยัง System.Runtime.InteropServices.COMException: The "SendUsing" configuration value is invalid.
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.Mail;
using System.Net;
public partial class Default6 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
MailMessage myMail = new MailMessage();
myMail.To = this.TextBox1.Text;
myMail.From = "<" + this.TextBox4.Text + ">" + this.TextBox4.Text;
myMail.Subject = this.TextBox2.Text;
myMail.BodyFormat = MailFormat.Html;
myMail.Body = this.TextBox3.Text.Replace("\n", "<br>");
SmtpMail.Send(myMail);
myMail = null;
}
}
ไม่รู้ว่าทำไม....
The "SendUsing" configuration value is invalid.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: The "SendUsing" configuration value is invalid.
Tag : ASP.NET, Ms SQL Server 2005, JavaScript, Ajax, Web (ASP.NET), C#
เครื่องผม windows 7 ลง iis7 ใช้มานานแล้ว ทำงานได้ปกติแต่ไม่เคยลองส่งเมลดูสักครั้ง ผมเพิ่ม SMTP ไปแล้วครับ
Error: ที่บอก The transport failed to connect to the server.