|
| |
|
|
carrie
Posts: 253 From: Port Orange, FL Volusia Status: offline
|
CDO to external mailserver - 9/9/2009 14:13:15
Hi all, I'll try to make this as brief as I can. I successfully setup a CDO email script on our webhost using 'localhost' as the SMTPserver, but it would only send to domains that were not ours. We do not host our email with the webhost, we have separate email servers. I notified the webhost of this problem and they suggested we relay to our mailserver, so I did, but I still get the dreaded recipient error: error '8004020f' Here is my code that the webhost suggested I use. I had a relay opened on our Exchange mailservers to allow email coming from the IP of our webserver. Please let me know if I am overlooking something simple. The webhost does not seem very knowledgeable, and they are blaming the problem on the relay.
<%
Dim ObjSendMail
Set ObjSendMail = CreateObject("CDO.Message")
'This section provides the configuration information for the 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") ="mailserverIP"
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
'we recommend sending emails using SMTP authentication
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") ="ouremail@email.com"
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="ourpassword"
ObjSendMail.Configuration.Fields.Update
'End remote SMTP server configuration section==
ObjSendMail.To = "someone@someone.net"
ObjSendMail.Subject = "this is the subject"
ObjSendMail.From = "someone@someone.net"
' we are sending a text email.. simply switch the comments around to send an html email instead
'ObjSendMail.HTMLBody = "this is the body"
ObjSendMail.TextBody = "this is the body"
ObjSendMail.Send
Set ObjSendMail = Nothing
%>
Thanks in advance, Carrie
|
|
|
|
carrie
Posts: 253 From: Port Orange, FL Volusia Status: offline
|
RE: CDO to external mailserver - 9/10/2009 11:18:43
Thanks Texas, The host says method 1 won't work on their servers. I tried method 2, but it didn't work - unless, of course, I changed the SMTP server to 'localhost' then it sent to everybody but us, which is where I started. Method 3 might be the only way I can do it. Our (remote) mailserver is an Exchange 2007 mailserver. I believe it uses SSL (because to access it via web, you have to type 'https'). However, I am now receiving a ‘The transport failed to connect to the server.’ error. That's with or without the password lines commented. Anything you can think of? Thanks, Carrie
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|