the following code to send an email via ASP.NET. When I run this on one
machine it works, on another one it doesn't. Both have VS.NET installed and
both have MS Outlook installed. What do I need done to the machine that
doesn't work? Or is something wrong with the code?
Dim email as New System.Web.Mail.Message
email.To = "me@dotnet.itags.org.me.com"
email.Subject = "Test Subject"
email.Body = "Test Body"
System.Web.Mail.SmtpMail.SmtpServer = "MyMailServer"
Try
System.Web.Mail.SmtpMail.Send(email)
Catch ex as Exception
lblError.Text = ex.Message
End Try
Thanks in advance!
--
Chuck Foster
Programmer Analyst
Eclipsys Corporation - St. Vincent Health SystemChuck, first make sure that CDO is installed on the server. Second, you
need to write out the inner exceptions. This error message is a generic
message and can be caused by an invalid SmtpServer address, an invalid
or missing addressee, an invalid from address, or a lack of privileges
on the Smtp Server among others.
Jason Bentley
[url]http://g
swithblogs.net/jbentley[/url]Thanks! I didn't have a valid from address. Matter of fact, I forgot it!
Thanks for your help!
"Jason Bentley" <imsinc@.gmail.com> wrote in message
news:1111579155.722354.71970@.l41g2000cwc.googlegroups.com...
> Chuck, first make sure that CDO is installed on the server. Second, you
> need to write out the inner exceptions. This error message is a generic
> message and can be caused by an invalid SmtpServer address, an invalid
> or missing addressee, an invalid from address, or a lack of privileges
> on the Smtp Server among others.
> Jason Bentley
> [url]http://g
swithblogs.net/jbentley[/url]>
0 comments:
Post a Comment