I can get this code below to email anywhere within the company, but not outside the network.
I've tried the values 0 (anonymous), 1 (basic), and 2 (NTLM) for the 'smtpauthenticate' variable. When using 0 I receive error:
The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for dustinbrooks71@hotmail.com
Using the values 1 or 2 I get:
The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available
Set objCDOSYSMail = Server.CreateObject("CDO.Message"
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration"
objCDOSYSCon.Fields("ht*p://schemas.microsoft.com/cdo/configuration/smtpserver" = "mailexch.rghp.com"
objCDOSYSCon.Fields("ht*p://schemas.microsoft.com/cdo/configuration/smtpserverport" = 25
objCDOSYSCon.Fields("ht*p://schemas.microsoft.com/cdo/configuration/sendusing" = 2
objCDOSYSCon.Fields("ht*p://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout" = 60
objCDOSYSCon.Fields("ht*p://schemas.microsoft.com/cdo/configuration/smtpauthenticate" = 1
objCDOSYSCon.Fields("ht*p://schemas.microsoft.com/cdo/configuration/sendusername" = "mydomain\myusername"
objCDOSYSCon.Fields("ht*p://schemas.microsoft.com/cdo/configuration/sendpassword" = "******"
objCDOSYSCon.Fields.Update
Set objCDOSYSMail.Configuration = objCDOSYSCon
objCDOSYSMail.From = "gnet@gordmans.com"
objCDOSYSMail.To = "dustinbrooks71@hotmail.com"
objCDOSYSMail.Subject = "Subject goes here"
objCDOSYSMail.HTMLBody = "test here"
objCDOSYSMail.Send
I'm not sure what else to try.
I've tried the values 0 (anonymous), 1 (basic), and 2 (NTLM) for the 'smtpauthenticate' variable. When using 0 I receive error:
The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for dustinbrooks71@hotmail.com
Using the values 1 or 2 I get:
The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available
Set objCDOSYSMail = Server.CreateObject("CDO.Message"
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration"
objCDOSYSCon.Fields("ht*p://schemas.microsoft.com/cdo/configuration/smtpserver" = "mailexch.rghp.com"
objCDOSYSCon.Fields("ht*p://schemas.microsoft.com/cdo/configuration/smtpserverport" = 25
objCDOSYSCon.Fields("ht*p://schemas.microsoft.com/cdo/configuration/sendusing" = 2
objCDOSYSCon.Fields("ht*p://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout" = 60
objCDOSYSCon.Fields("ht*p://schemas.microsoft.com/cdo/configuration/smtpauthenticate" = 1
objCDOSYSCon.Fields("ht*p://schemas.microsoft.com/cdo/configuration/sendusername" = "mydomain\myusername"
objCDOSYSCon.Fields("ht*p://schemas.microsoft.com/cdo/configuration/sendpassword" = "******"
objCDOSYSCon.Fields.Update
Set objCDOSYSMail.Configuration = objCDOSYSCon
objCDOSYSMail.From = "gnet@gordmans.com"
objCDOSYSMail.To = "dustinbrooks71@hotmail.com"
objCDOSYSMail.Subject = "Subject goes here"
objCDOSYSMail.HTMLBody = "test here"
objCDOSYSMail.Send
I'm not sure what else to try.