SmtpMail problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I'm tryong to use SmtpMail object but gets an error saying

Configuratioonvalue "SendUsing# is not valid.

Any ideas?

TIA

Kenneth P
 
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 = "(e-mail address removed)";
msg.From = "(e-mail address removed)";
msg.Subject = "Hello World";
msg.Body = "n/t";

SmtpMail.SmtpServer = "smtp.example.com";
SmtpMail.Send(msg);
%>

Cheers,
Daniel
http://www.danhendricks.com
 
Back
Top