Solved

CDO Error message

Posted on 2003-11-12
9
1,091 Views
Last Modified: 2007-12-19
Hello I am getting an error message

error '8004020e'
/index.asp, line 397

Line 397 is the Send method in the following code
<%
Dim iMsg
Dim iConf
Dim Flds
Dim strHTML
                      
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
                      
With Flds
 .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.mgdinc.com"
 .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 40
 .Update
End With
                  
With iMsg
 Set .Configuration = iConf
      .From              = emailFrom
      .To              = emailTo
      .Subject             = emailSubject
      .HTMLBody       = "Email Text"
      .TextBody             = .HTMLBody
      .Send                                                      'error here
End With
                          
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
%>

 The error is most likely caused by somthing not being setup up or configured correctly. The same code works on another website on the same server. I can not find any differences between the sites except that Exchange is somehow set up on the other one. I should explain that the previous example used to have a conflict with Exchange, that required me to reinstall it, something that I would like to avoid this time.
Thanks for your help
ff
0
Comment
Question by:funkyfinger
9 Comments
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9734671
Is this a valid and properly configured smtp server?

mail.mgdinc.com

FtB
0
 
LVL 2

Author Comment

by:funkyfinger
ID: 9734978
Yes, it works fine on another website on the same server.
Under "Internet services manager" I have 2 sites listed the old and the new one. SMTP is not listed here, I'm not sure if it should be, if I expand the old site one subheading is called "Exchange", I don't know if that information helps you or not.
Thanks
ff
0
 
LVL 3

Expert Comment

by:barryfandango
ID: 9734980
This guy had the same problem:

http://www.mail-archive.com/asp_cdo@p2p.wrox.com/msg01360.html

Maybe one of the solutions suggested here will work for you.
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 2

Author Comment

by:funkyfinger
ID: 9735593
Thanks for your help guys, I've decided to give up on the problem and go with CDONTS,
btw That doesn't work on the web site with exchange.
ff
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9735789
I would recommend looking into the free and excellent ASPeMail from www.Persits.com .

It works well with remote smtp services and is easy to work with.

FtB
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9736037
It is an irregular request given the options that were listed above. If funkyfinger truly believes that s/he received no help here whatsoever, then I suppose that it is alright to process the refund.

FtB
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 9754188
PAQed, with points refunded (250)

Computer101
E-E Admin
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9754244
FunkyFinger--

Please maintain your open questions:

Questions Asked 29
Questions Open 8
Questions Graded: 19
Questions Deleted: 2
Last 10 Grades Given: A A A A A A A A A B

Fritz the Blank
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question