Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SmtpMail.SmtpServer

Status
Not open for further replies.

qsac

Programmer
Jan 22, 2002
242
US
does anyone know how to output the error from SmtpMail.SmtpServer? The mail is not sending out, and I cant figure out why.

Are theere any special permissions i need on the server?

any help with this object would be greatly appreciated.

 
First, check to make sure your stmp server is setup to relay messages for you. This is done by opening the properties of your SMTP virtual server in IIS.
Click the Access Tab
Click Relay Restrictions
Select All except the list below
Check Allow all coputer which successfully authenticate to relay, regardless of the list above
Click OK
Click Authentication
Select the method of Authentication
*Depending on your security needs you may need to modify these selections.

Also check your web.config file and set <customErrors mode="Off" /> this will allow your errors to display on client machines. This is good for developement, but remember to set it to "RemoteOnly" or "On" when it goes live (so users don't see ulgy error messages.)

If you get the CDO.Message error it's not helpful at all. you will need to cycle through the inner exceptions as well. place this in the your routine
Code:
try
   'send email
catch ex as exception
  While Not ex.InnerException Is Nothing Then
    Response.Write= ex.InnerException.ToString & "<BR>"
  End While
end try

this may help solve your issue. You may also need to authenticate to your smtp server. To do this you will need .Net Framework 1.1

Hope this helps

Jason Meckley
Database Analyst
WITF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top