View Full Version : CDO.Send error
Discusman 02-24-2005, 11:39 PM I get this error:
error '8004020f'
/face/dragonball/testingemail.asp, line 24
line 24 is: cdoMessage.Send
I'm using windows 2003, II6.
Auto send email to an external mail service (hotmail.com).
and I get the above error..
Any clue???
sprintserve 02-25-2005, 12:17 AM Are you using CDONTS or CDOSYS? Windows 2003 no longer natively supports CDONTS.
andy18 02-25-2005, 05:36 AM as sprintserver mentioned, CDONTS is no longer supported in Windows 2003 but you may refer to the other thread I replied for you for more details.
please note also ;
1. Are you running both IIS SMTP and Mailenable on the same Windows 2003 ? If yes , you will need to change the IIS SMTP port to alternative port as it will not work for you for both Mailenable and IIS SMTP to run on the same SMTP port 25.
The following will explain more in the Error code you get :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdosys/html/_cdosys_error_codes.asp
Discusman 02-25-2005, 09:01 AM Guys,
I've found the real cause of this error..
I'm using MailEnable as my email server. It is the relay setting causing the error.
Currently, I only allow authenticated sender to send emails..
And I can send email to myself (admin@mydomain.com).
It wouldn't allow to send email to external email service such as yahoo or hotmail
Then I edit the relay setting to "allow local address senders" to send emails. Everything works fine.
If allow this option, then I will have a security issue. I have learned my lesson well, people used my email server to send spam emails.
what are the ways to go around it? Thanks.
andy18 02-25-2005, 09:11 AM try enable the "allow relay for privileges Ips" in the smtp connector setting. add in the ip 127.0.0.1 and the server ip(s) which you wish to allow relay. Restart the smtp service and make a try
Discusman 02-25-2005, 09:37 AM Originally posted by andy18
try enable the "allow relay for privileges Ips" in the smtp connector setting. add in the ip 127.0.0.1 and the server ip(s) which you wish to allow relay. Restart the smtp service and make a try
I added my server private IP in the list. It doesn't work still...:rolleyes:
netomatic 02-25-2005, 10:32 AM Forget CDONTS and CDOSYS, use Persits AspEmail component . It is much more robust and free
Discusman 02-25-2005, 12:23 PM Originally posted by shashikant
Forget CDONTS and CDOSYS, use Persits AspEmail component . It is much more robust and free
I know that company Persits.. I used to use their ASPUpload components..
Then they started charging people..
I do not want to change around components of my website too much..
If it's free now. Soon they will start charging people..
andy18 02-25-2005, 01:26 PM what are the sender email account you used in the script ? Are you using the email account on the server or an external email account ? do u have MS SMTP service installed ?
Discusman 02-25-2005, 02:30 PM Originally posted by andy18
what are the sender email account you used in the script ? Are you using the email account on the server or an external email account ? do u have MS SMTP service installed ?
I am trying to send mails to external email services such as hotmail n yahoo.
I can send mail to myself which is admin@mydomain.com
It wouldn't work if I am sending the mails to yahoo.com or hotmail.com
However, if I enable "Allow Local Address Senders". Then I have no problem with sending the mail.
I'm using MailEnable and it comes with SMTP. If I install SMTP in IIS 6, then it would be port conflict??
So what is your suggestion?
andy18 02-25-2005, 03:07 PM my first post above :
Are you running both IIS SMTP and Mailenable on the same Windows 2003 ? If yes , you will need to change the IIS SMTP port to alternative port as it will not work for you for both Mailenable and IIS SMTP to run on the same SMTP port 25.
and my last question is " what is the sender email account you used in your script" , usually mailenable will only allow authenticated users ( valid email account ) on your mailenable server to send mails through, if you are using external email account, the mail will fail to relay through your mail server.
Discusman 02-25-2005, 03:23 PM Originally posted by andy18
my first post above :
and my last question is " what is the sender email account you used in your script" , usually mailenable will only allow authenticated users ( valid email account ) on your mailenable server to send mails through, if you are using external email account, the mail will fail to relay through your mail server.
I do not have any other SMTP installed on my machine. MailEnable is the only mail server I installed..
I have an account at hotmail.com and I am trying to send an automated email to "me@hotmail.com"
I know it's not working. What is solution? Thanks.
andy18 02-25-2005, 03:31 PM u will need IIS SMTP service installed in order to use the CDONTS :
http://support.microsoft.com/default.aspx?scid=kb;en-us;324649
Discusman 02-25-2005, 03:55 PM Originally posted by andy18
u will need IIS SMTP service installed in order to use the CDONTS :
http://support.microsoft.com/default.aspx?scid=kb;en-us;324649
I'm not using the CDONTS. Windows 2003 doesn't use CDONTS.
I'm using the CDO object and it seems to be working except it wouldn't let me send email to external email account when I disable "Allow Local Address Sender"
Here is the code htat I'm using:
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = Server.CreateObject("CDO.Configuration")
cdoConfig.Fields.Item(sch & "sendusing") = 2
cdoConfig.Fields.Item(sch & "smtpserver") = "<mail.mydomain.com>"
cdoConfig.fields.update
Set cdoMessage = Server.CreateObject("CDO.Message")
Set cdoMessage.Configuration = cdoConfig
I'm still trying to make this work...
<%
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 2 ' cdoSendUsingPort
.Item(sch & "smtpserver") = "your.smtp.mailserver"
.update
End With
Set cdoMessage = CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = "webmaster@yourdomain.com"
.To = "you@yourdomain.com"
.Subject = "Contact us form. YourDomain.Com"
.TextBody = "Your Body Message or link to Form"
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
%>
<%
Response.redirect("message_sent.htm")
%>
Make sure to create a page message_sent.htm for success page and your form link to textbody should be correct.
Thanks,
Net
Discusman 02-25-2005, 09:16 PM Hi Net,
What's your point of posting the ASP script?
The problem that I am having is nothing to do with ASP script.
Did you find any relationship between the problem I'm having and the ASP script??
:confused:
Oh sorry, I guess I didn't read your problem properly.
I am posting the cdosys code for asp. I didn't know you are having problem in the server.
Discusman 02-26-2005, 12:35 AM Originally posted by net
Oh sorry, I guess I didn't read your problem properly.
I am posting the cdosys code for asp. I didn't know you are having problem in the server.
Thanks for your time...
I think my problem is never going to be fixed..
oliverd 08-31-2010, 05:01 AM hi there,
we are having this problem too, did anybody find a solution to it?
|