I'm tryong to use SmtpMail object but gets an error saying
Configuratioonvalue "SendUsing# is not valid.
Any ideas?
TIA
Kenneth PI believe SendUsing is used under the hood as the mail server. It
defaults to localhost, but you can override it with the SmtpServer
property of the SmtpMail class.
<%
MailMessage msg = new MailMessage();
msg.To = "you@.example.com";
msg.From = "sender@.example.com";
msg.Subject = "Hello World";
msg.Body = "n/t";
SmtpMail.SmtpServer = "smtp.example.com";
SmtpMail.Send(msg);
%
Cheers,
Daniel
http://www.danhendricks.com
Hi Daniel,
It sure helped. Thanks alot.
Kenneth P
"Daniel M. Hendricks" wrote:
> I believe SendUsing is used under the hood as the mail server. It
> defaults to localhost, but you can override it with the SmtpServer
> property of the SmtpMail class.
> <%
> MailMessage msg = new MailMessage();
> msg.To = "you@.example.com";
> msg.From = "sender@.example.com";
> msg.Subject = "Hello World";
> msg.Body = "n/t";
> SmtpMail.SmtpServer = "smtp.example.com";
> SmtpMail.Send(msg);
> %>
> Cheers,
> Daniel
> http://www.danhendricks.com
>
0 comments:
Post a Comment