Solved

CDO Error message

Posted on 2003-11-12
9
1,083 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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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/…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 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

11 Experts available now in Live!

Get 1:1 Help Now