Problem sending mail on Server 2003 "SendUsing" configuration is invalid

B

Brent

Hi, I have a C# asp.net app that sent mail fine on server 2000 or win 2000,
but now I moved it to our new 2003 box, and it's giving me "The 'SendUsing'
configuration is invalid"
This is the code now...
MailMessage mail = new MailMessage();



mail.From = from;

mail.To = email;

mail.Subject = subject;

mail.Body = body;

mail.BodyFormat = MailFormat.Html;


if(email!="")

SmtpMail.Send(mail);



Please help.

Thanks,

Brent
 
S

S. Justin Gengo

Brent,

You need to specify which server should send the email

SmtpMail.SmtpServer = "[your mail server here]"

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 
B

Brent

Ya, I just found that out before I checked this. Thanks anyway. Interesting
that it was not required on server 2000/win2000.

S. Justin Gengo said:
Brent,

You need to specify which server should send the email

SmtpMail.SmtpServer = "[your mail server here]"

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche


Brent said:
Hi, I have a C# asp.net app that sent mail fine on server 2000 or win 2000,
but now I moved it to our new 2003 box, and it's giving me "The 'SendUsing'
configuration is invalid"
This is the code now...
MailMessage mail = new MailMessage();



mail.From = from;

mail.To = email;

mail.Subject = subject;

mail.Body = body;

mail.BodyFormat = MailFormat.Html;


if(email!="")

SmtpMail.Send(mail);



Please help.

Thanks,

Brent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top