hello all,
i'm facing the problem my using the smtp.send .
my coding is as below:
<%@dotnet.itags.org. Import Namespace="System.Web.Mail" %>
<Script runat="Server">
Sub PostButton_Click( s As Object, e As EventArgs )
SmtpMail.Send( _
mailfrom.Text, _
mailto.Text, _
mailsubject.Text, _
mailbody.Text )
End Sub
</Script>
However, when i compiler and run this web page by click the PostButton, the error come out as below:-
[COMException (0x80040220): The "SendUsing" configuration value is invalid.]
i already configuring the Microsoft SMTP service at IIS and running it on my server.
so, what the problem? and how to solve this problem?
Thanks.
try:
Sub PostButton_Click( s As Object, e As EventArgs )
// you need to declare msg here
msg.From = "you@.yourdomain.com"
msg.To = "destination@.yourdomain.com"
msg.Subject = "Test Subject"
msg.Body = "Test Body"
SmtpMail.Send
End Sub
Thanks Curt_C..
i already try it, But i still can't solve this problem..
Now the problem is " The transport failed to connect to the server. "
But i already start running the smtp server.
so, can anybody help me solving this problem??
thanks.
Did you specify the server?
SmtpMail.SmtpServer = "your.server.com"
0 comments:
Post a Comment