Solved

CDO Error message

Posted on 2003-11-12
9
1,086 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Dynamic? Dropdown Box 29 71
EOF BOF error classic asp 8 42
Copy only dates 3 78
Pass through dll 2 62
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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 demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

930 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now