Hi there,
You may need to set the SMTP server explicitly. I believe it defaults to localhost (that's why it works on your local machine). Apparently, the server your page runs on does not have an SMTP server installed, so it can't send the mail using localhost.
Try this:
Code:
SmtpMail.SmtpServer = "smtp.YourProvider.com";
SmtpMail.Send(objMail);
or in your case since you're not using a
using statement (no pun intended):
Code:
System.Web.Mail.SmtpMail.SmtpServer = "smtp.YourProvider.com";
System.Web.Mail.SmtpMail.Send(objMail);
This will force the ASP page to send the e-mail to the smtp.YourProvider.com server.
HtH,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.