[thelist] CDO Mail Form - Unable to send?

Anthony Baratta anthony at baratta.com
Sat Apr 3 02:04:52 CDT 2010


On 4/2/2010 9:47 PM, P Chen wrote:
> A code typo. But even with the correction it still halts at the .send line.

I can telnet to port 25 and 587 for that domain name...and get an SMTP 
"ehlo", so it must be your code (or the host server is blocking those 
two ports.

Option 1: Try changing the outgoing port to 25, the outgoing server 
"your" domain's SMTP mail server, and send the test message to your 
account. If that does not go through - the local server might be 
blocking outgoing port 25.

Option 2: Try this code instead...

<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="mymail at mydomain.com"
myMail.To="someone at somedomain.com"
myMail.TextBody="This is a message."
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
'Name or IP of remote SMTP server
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.server.com"
'Server port
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
myMail.Configuration.Fields.Update
myMail.Send
set myMail=nothing
%>

Edit accordingly.



--
Anthony Baratta

Caesar had his Brutus; Charles the First, his Cromwell; and George the 
Third ["Treason!" cried the Speaker]--may profit by their example. If 
this be treason, make the most of it.
Patrick Henry
Speech in the Virginia Convention, 1765. Patrick Henry. 1736-1799



More information about the thelist mailing list