Nick Cole
Starting Member
20 Posts |
Posted - 02 March 2007 : 19:51:39
|
Finally got it to work! No help from the ISP though. After trawling around various MSDN and other developer sites, only one thing was misidentified. The help suggests using the smtp service on the website. This couldn't be made to work, but using the smtp server in my ISP's network did! For added security I also added in the CDOSYS field settings section of inc_mail.asp; ..configuration/smtpserverport") = 25 ..configuration/smtpusessl") = False ..configuration/smtpserver") = "server name.domain" though this was already entered on the config page.
I created a test script as follows, which was placed in the asp pages directory of the site, and tested by appending the file_name.asp after the site and directory url. Errors reported not connecting to the transport. So I could then test various mail server configurations. And finally a blank page with no errors meant it works!
test_mail.asp <% Dim ObjSendMail Set ObjSendMail = CreateObject("CDO.Message") 'This section provides the configuration information for the remote SMTP server. ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network). ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="ispmailsvr.system.net" ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False) ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 ' If your server requires outgoing authentication uncomment the lines bleow and use a valid email address and password. 'ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication 'ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="USER_NAME" 'ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="PASSWORD" ObjSendMail.Configuration.Fields.Update 'End remote SMTP server configuration section== ObjSendMail.To = "your_address@system.com" ObjSendMail.Subject = "this is the subject" ObjSendMail.From = "someone@someone.net" ObjSendMail.TextBody = "this is the body" ObjSendMail.Send Set ObjSendMail = Nothing on error goto 0 %> (Remember line wrapping and uncommenting appropriate lines!) Hooray!
Thanks for all the pointers. |
 |
|