Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 14th, 2007, 07:33 AM
Registered User
 
Join Date: Mar 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to roynaveen
Default Problems with CDO.Message (CDOSYS)

I am trying to do a form to email from my website hosted in a Windows Server 2003 Standard Edition.

The form when submitted should go to user@mydomain.com. But it gives me the following error message.

error '8004020f'
with the line number

Suppose i change the email address from user@mydomain.com to any other address outside mydomain i.e. yahoo.com or hotmail.com it works fine.

Please help me.

Thank You

Naveen

Below is my code,

     if mailComp = "CDOSYS" then
       set cdoMessage = Server.CreateObject("CDO.Message")
       set cdoConfig = Server.CreateObject("CDO.Configuration")
       cdoMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
       cdoMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "127.0.0.1"
       cdoMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 0
       cdoMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
       cdoMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
       cdoMessage.Configuration.Fields.Update

       cdoMessage.From = Request.Form("EMAIL")
       cdoMessage.To = "user@mydomain.com"
       cdoMessage.Subject = subject
       cdoMessage.HtmlBody = body
       cdoMessage.Send
       if Err.Number <> 0 then
         SendMail = "Email send failed: " & Err.Description & "."
       end if
       set cdoMessage = Nothing
       exit function
     end if

 
Old March 14th, 2007, 07:56 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Your SMTP requires outgoing authentication (e.g. it is not an open relay)

Read this article.
http://classicasp.aspfaq.com/email/h...-with-cdo.html

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with CDOSYS and servers Python Classic ASP Professional 11 December 21st, 2007 07:10 AM
Source: CDO.Message.1 please help me:) ilknur SQL Server 2000 1 July 23rd, 2006 12:52 PM
Need help related CDO.Message shankhan Classic ASP Basics 9 January 2nd, 2005 07:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.