Could not access 'CDO.Message' object. (Proper SMTP settings!!!)

Last post 05-19-2006 1:37 PM by smcmiata. 21 replies.

Sort Posts:

  • Could not access 'CDO.Message' object. (Proper SMTP settings!!!)

    10-02-2004, 3:35 AM
    • Member
      135 point Member
    • raca
    • Member since 05-13-2003, 11:27 PM
    • Posts 27
    Hi,
    I need a tutorial on how to setup SMTP settings with a standalone machine (separate from web server machine) that runs e.g.. MailEnable server. I also need advice on setting DNS MX records so emails send to my domain are handled by MailEnable server in DMZ or local network.

    Thanks in advance.

    I am getting this error when I run Test (for SMTP settings) in Host Settings module:
    Could not access 'CDO.Message' object.
    More detailed message from Site log is at the end of this post.

    I am using Windows 2003 EE. I have these settings:
    SMTP Server: mail.mymailenable.net
    SMTP User : admin@mysite.com
    SMTP Password: xxxxx

    I am trying to connect to 'Mailenable' SMTP server that I know is working. I co-located my server with my partner's network. He is not full ISP. Just having T1 bandwidth and a few servers.
    He created "Post offices" for his domain mymailenable.net (that is working) and mine: mysite.com and created admin@mysite.com account under mine (mysite.com) post office.

    DNS Settings for www.mysite.com is:

    Host Name Record Type Address
    @ (none) A 207.166.166.166
    www A 207.166.166.166
    * MX (MX Pref 10) mail.mymailenable.net.
    @ MX (MX Pref 10) mail.mymailenable.net.

    (207.166.166.166 and mail.mymailenable.net. are fictitious addresses.)

    The test at mailenabler server http://www.mailenable.com/Tools/memaillookup.asp
    shows that my DNS settings are OK. The SMTP services is started in IIS6 and I granted permission to 127.0.0.1 localmachine to relay e-mail through this SMTP virtual server (I am not sure if this is necessary - it used to work when I sent emails from W2K machine via my rogers email account).


    Thank you once again
    Rad

    ErrorCode: -2147467259
    Message: Could not access 'CDO.Message' object.
    InnerException: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80040211): The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available --- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args)
    TargetSite: System.Object CallMethod(System.Object, System.String, System.Object[])
    StackTrace: at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) at System.Web.Mail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message) at DotNetNuke.Globals.SendMail(String From, String To, String Cc, String Bcc, MailPriority Priority, String Subject, MailFormat BodyFormat, Encoding BodyEncoding, String Body, String Attachment, String SMTPServer, String SMTPUsername, String SMTPPassword) in H:\Projects\NET\DNN\DnnFramework\DotNetNuke_2.1.2\components\Globals.vb:line 182
    HelpLink:
    Source: System.Web
  • Re: Could not access 'CDO.Message' object. (Proper SMTP settings!!!)

    10-02-2004, 11:11 AM
    • Star
      13,145 point Star
    • J7Mitch
    • Member since 10-19-2002, 1:23 PM
    • Posts 2,632
    • TrustedFriends-MVPs


    First thing I would check is if you can use the admin@mysite account with webmail, or through outlook express or some other client.

    You can use my webmail client at:

    http://www.snapsis.com/DesktopDefault.aspx?tabid=339

    to try and send mail if you like.

    Also, I didn't see it, but you will have to have a host (A Record) in DNS for "mail" in the mymailenable.net forward lookup zone.

    if mail.mymailenable.net can't be resolved then the MX record will only get it half way there.
    John M.

    DotNetNuke Module for Performance
  • Re: Could not access 'CDO.Message' object. (Proper SMTP settings!!!)

    10-02-2004, 3:04 PM
    • Contributor
      4,760 point Contributor
    • DBuckner
    • Member since 01-23-2003, 11:10 PM
    • Illinois
    • Posts 952
    "I am using Windows 2003 EE. I have these settings:
    SMTP Server: mail.mymailenable.net
    SMTP User : admin@mysite.com
    SMTP Password: xxxxx "

    take the .com off your username. Mail enables format if multipal domains exist is to use say admin@mysite

    HTH,
    Dave
  • Re: Could not access 'CDO.Message' object. (Proper SMTP settings!!!)

    10-02-2004, 4:01 PM
    • Member
      135 point Member
    • raca
    • Member since 05-13-2003, 11:27 PM
    • Posts 27
    These are my real DNS settings for 'rentalvista.com' (207.164.21.230)

    Host Name Record Type Address
    @ (none) A 207.164.21.230
    www A 207.164.21.230
    * MX (MX Pref 10) mail.qs-quote.net.
    @ MX (MX Pref 10) mail.qs-quote.net.


    (mail.qs-quote.net is on address: 207.164.21.229)

    Test at MailEnable web site: http://www.mailenable.com/Tools/memaillookup.asp
    for domain 'rentalvista.com' shows all pass results.
    Am I doing something wrong?

    I tried using just webmaster@rentalvista (without .com) and still get CDO.Message error.

    I need an explanation of this record:
    @ (none) A 207.164.21.230

    Maybe I don't understand it correctly is this '@' sign here just to allow
    my domain to be accessed with just http://rentalvista.com and ftp://rentalvista.com.
    Does it have anything to do with SMTP protocol and target email: webmaster@rentalvista.com.

    My partner suggest that I create A record from my domain rentalvista.com:
    @ (none) A 207.164.21.229

    I believe he is wrong.

    Maybe I don't understand it correctly is this '@' sign here just to allow
    my domain to be accessed with just http://rentalvista.com and ftp://rentalvista.com.
    Does it have anything to do with SMTP protocol and target email: webmaster@rentalvista.com.

    My partner suggest that I create A record from my domain rentalvista.com:
    @ (none) A 207.164.21.229

    I believe he is wrong.


    Thanks
    Rad
  • Re: Could not access 'CDO.Message' object. (Proper SMTP settings!!!)

    10-02-2004, 10:18 PM
    • Star
      13,145 point Star
    • J7Mitch
    • Member since 10-19-2002, 1:23 PM
    • Posts 2,632
    • TrustedFriends-MVPs
    Hi Rad,
    You are right, @ (none) A 207.164.21.230 means that http://rentalvista.com and ftp://rentalvista.com (no host name) will resolve to 207.164.21.230 and you do not need a record for @ (none) A 207.164.21.229

    There does need to be an "A" (host record) for mail.qs-quote.com if it is the server that is hosting your e-mail. This is there because I can do an NSLOOKUP and find it.

    If you are sure that 207.164.21.229 is the IP that is running the mail server for your domain you can put this IP in for the mail server instead of mail.qs-quote.com and see if that works.

    It may just be that the DNS entries are not available to your web server that is hosting DNN yet.

    Another way to see if you are connecting to the mail server is to telnet from the webserver on port 25. From a DOS prompt do >telnet mail.qs-quote.net 25 {enter}

    You should see a welcome message to your mail server like this:
    220 QS-QUOTE.NET ESMTP MailEnable Service, Version: 1.8-- ready at 10/02/2004

    John M.

    DotNetNuke Module for Performance
  • Re: Could not access 'CDO.Message' object. (Proper SMTP settings!!!)

    10-03-2004, 12:22 AM
    • Star
      11,175 point Star
    • mrswoop
    • Member since 04-11-2003, 3:51 PM
    • Seattle, WA
    • Posts 2,235
    Hey John...

    If Rad is actually getting CDO object errors, doesn't it sound more like CDO may just not be configured on the server? Doesn't seem like any kind of problem related to DNS would drive that error. Maybe I'm wrong... but my experience would lead me to make sure mail is enabled from the server. You could assemble a very simple ASPX page outside of the DNN application to test it for certain.

    Cheers,
    Scott
    Scott Willhite
    It is only with the heart that one can see rightly... what is essential is invisible to the eye.
    ~ Antoine de Saint-Exupéry
  • Re: Could not access 'CDO.Message' object. (Proper SMTP settings!!!)

    10-03-2004, 2:38 AM
    • Member
      135 point Member
    • raca
    • Member since 05-13-2003, 11:27 PM
    • Posts 27

    Edited by SomeNewKid. Please post code between <code> and </code> tags.




    There is an article: http://www.asp101.com/articles/john/cdosmtprelay/default.asp
    that might help here but I don't know how is that related to DNN email settings.

    After reading this I now don't know if SMTP service is needed for DNN email.
    Currently I have 127.0.0.1 added to relay on web machine. I am not sure if Smart Host settings might help (I didn't setup this).

    As John suggested I telnet to my mail server from DNN machine and I got the response. I think it has something to do with the way MailEnable is handling a domain. My partner added 3 domains under its own post offices. When he switched some settings in MailEnable admin for the 'localhost default' to RENATALVISTA.COM instead of QS-QUOTE.NET I was able to send and retrieve messages for webmaster@rentalvista.com via Outlook IMO client. However I wasn't able to send a test email message from host settings module neither with the MAIL.QS-QUOTE.NET nor it's IP address. Again the same error Could not access 'CDO.Message' object.

    As Scott suggested I ran a VBScript (asp file) bellow and got this error:

    The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available

    I think this confirms incorrect settings on the mail server for rentalvista.com domain and that I indeed have correct CDO installed there because what else would return me this error if not CDO


    <%
    
    Const cdoSendUsingMethod = "http://schemas.microsoft.com/cdo/configuration/sendusing"
    Const cdoSendUsingPort = 2
    Const cdoSMTPServer = "http://schemas.microsoft.com/cdo/configuration/smtpserver"
    Const cdoSMTPServerPort = "http://schemas.microsoft.com/cdo/configuration/smtpserverport"
    Const cdoSMTPConnectionTimeout = "http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
    Const cdoSMTPAuthenticate = "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
    Const cdoBasic = 1
    Const cdoSendUserName = "http://schemas.microsoft.com/cdo/configuration/sendusername"
    Const cdoSendPassword = "http://schemas.microsoft.com/cdo/configuration/sendpassword"

    Dim objConfig ' As CDO.Configuration
    Dim objMessage ' As CDO.Message
    Dim Fields ' As ADODB.Fields

    ' Get a handle on the config object and it's fields
    Set objConfig = Server.CreateObject("CDO.Configuration")
    Set Fields = objConfig.Fields

    ' Set config fields we care about
    With Fields
    .Item(cdoSendUsingMethod) = cdoSendUsingPort
    .Item(cdoSMTPServer) = "MAIL.QS-QUOTE.NET"
    .Item(cdoSMTPServerPort) = 25
    .Item(cdoSMTPConnectionTimeout) = 10
    .Item(cdoSMTPAuthenticate) = cdoBasic
    .Item(cdoSendUserName) = "webmaster@rentalvista.com"
    .Item(cdoSendPassword) = "xxxxxxxxxxxxxxxxxxxxxxxxx"

    .Update
    End With

    Set objMessage = Server.CreateObject("CDO.Message")

    Set objMessage.Configuration = objConfig

    On Error Resume Next
    With objMessage
    .To = "xxx1@rogers.com"
    .From = "xxx2@hotmail.com"
    .Subject = "SMTP Relay Test"
    .TextBody = "SMTP Relay Test Sent @ " & Now()
    .Send
    End With

    if err.number<>0 then
    response.write(err.description)
    end if
    Set Fields = Nothing
    Set objMessage = Nothing
    Set objConfig = Nothing
    %>


    Thanks
    Rad
  • Re: Could not access 'CDO.Message' object. (Proper SMTP settings!!!)

    10-03-2004, 8:17 AM
    • Star
      13,145 point Star
    • J7Mitch
    • Member since 10-19-2002, 1:23 PM
    • Posts 2,632
    • TrustedFriends-MVPs

    Scott may be right, it could be the CDO setup on the server, but I assumed that was correct since the original questions were about DNS. Not good to assume, but the other checks were good to narrow down the possibilities. With this last test, I agree with Rad that CDO is probably configured on the server OK, since most servers have CDO on them by default and this is hardly ever the problem. The DNN code only trys to send and if anything fails at all it says Could not access 'CDO.Message' object, but the original stack trace and the test indicate that the remote SMTP did not respond correctly.

    Two more things to try:

    1. You can put your webserver's IP or domain name into the SMTP server field and see if the SMTP service is running on it.

    2. Since you are trying to relay through a remote server it probably requires that the FROM address in your sent e-mails are valid in the domain that you are authenticating and sending with. Try making your FROM property webmaster@rentalvista.com
    You do this in DotNetNuke by setting the Administrator's e-mail address. When logged in as admin, click on the administrator link for the user profile and change the e-mail address there.
    John M.

    DotNetNuke Module for Performance
  • Re: Could not access 'CDO.Message' object. (Proper SMTP settings!!!)

    10-03-2004, 12:00 PM
    • Star
      11,175 point Star
    • mrswoop
    • Member since 04-11-2003, 3:51 PM
    • Seattle, WA
    • Posts 2,235
    Agreed. Thanks John... I'm pretty interested in the results of this thread myself.

    Cheers,
    Scott
    Scott Willhite
    It is only with the heart that one can see rightly... what is essential is invisible to the eye.
    ~ Antoine de Saint-Exupéry
  • Re: Could not access 'CDO.Message' object. (Proper SMTP settings!!!)

    10-03-2004, 11:31 PM
    • Member
      135 point Member
    • raca
    • Member since 05-13-2003, 11:27 PM
    • Posts 27
    I finally have success.

    (Not to forget to ask you BTW, I lost snap-in for my SMTP in IIS6. I am sure I didn't uninstall it. How to find it?)

    These are my current DNS settings.
    Host Name Record Type Address
    @ (none) A 207.164.21.230
    mail A 207.164.21.229
    www A 207.164.21.230
    * MX (MX Pref 10) mail.rentalvista.com.
    @ MX (MX Pref 10) mail.rentalvista.com.

    As John suggested (thank you John) I typed in webmaster@rentalvista.com for Host email and only set SMTP server settings this time to mail.rentalvista.com and it worked even without user or user/password combination. I do have SMTP setup and added 127.0.0.1 in Relay dialog and I am not sure if SMTP is used at all. I think yes based on the interpretation bellow.


    Bellow is header of email message that was successfully sent via Test button from Host Settings module.


    Received: from wizard ([207.164.21.230]) by QS-QUOTE.NET with MailEnable ESMTP; Sun, 03 Oct 2004 22:37:17 -0400
    thread-index: AcSpuxOaip1I8NpLQZyoonSwElcH4g==
    Thread-Topic: IWEG12345 SMTP Configuration Test
    From: <webmaster@rentalvista.com>
    To: <webmaster@rentalvista.com>
    Subject: IWEG12345 SMTP Configuration Test
    Date: Sun, 3 Oct 2004 22:37:22 -0400
    Message-ID: <001801c4a9bb$139a8a10$1ea8a8c0@wizard>
    MIME-Version: 1.0
    Content-Type: text/plain;
    charset="iso-8859-1"
    Content-Transfer-Encoding: 7bit
    X-Mailer: Microsoft CDO for Windows 2000
    Content-Class: urn:content-classes:message
    Importance: normal
    Priority: normal
    X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.181



    I interpret line:
    Received: from wizard ([207.164.21.230]) by QS-QUOTE.NET with MailEnable ESMTP
    like this: The message was received from 207.164.21.230 machine (my web machine) with what?? SMTP service (what else would sent it from that address)

    Line:
    X-Mailer: Microsoft CDO for Windows 2000
    should confirm what I said above.

    To conclude. I believe that if I disable (or uninstall or remove 127.0.0.1 from relay) SMTP
    service in IIS then I would need SMTP extra user/password combination to directly send email via MailEnable machine.
    Can you guys confirm this. I am just tired from the whole experiment and I would like if I finally understand this issue.

    I will probably do a final experiment. If you suggest how to recover SMTP snap-in I will try to stop the services (I know I can do it from Services panel) and try sending a Test email with
    SMTP and User/Password combination directly via MailEnable server.

    Thank you John and Scott for being with me. I hope others might benefit from this thread.


    Rad
  • Re: Could not access 'CDO.Message' object. (Proper SMTP settings!!!)

    10-04-2004, 11:59 AM
    • Star
      13,145 point Star
    • J7Mitch
    • Member since 10-19-2002, 1:23 PM
    • Posts 2,632
    • TrustedFriends-MVPs

    Glad it's working Rad. I should have had you check the administrators address sooner I guess.

    Your SMTP snap-in should be under Internet Information Services (that's the snap-in you add to see the SMTP virtual server anyway)

    If your MailEnable machine is the same as the webserver then you can Relay from 127.0.0.1, but if it is not then you better look into why it's allowing the relay without authentication real quick (open relay blacklisting can happen within hours).

    You should not allow relay without authentication, and maybe from trusted IP address (if you trust everyone using that IP).
    John M.

    DotNetNuke Module for Performance
  • Re: Could not access 'CDO.Message' object. (Proper SMTP settings!!!)

    01-02-2005, 7:07 PM
    • Member
      195 point Member
    • meistvan
    • Member since 05-21-2003, 4:47 PM
    • Posts 39
    I'm testing smtp service using mailenable on a WinXP Pro box.

    right after the installation, without changes I was able to get the test to work, but only once.

    after that, I get the same CDO error that is mention in this thread.

    My eventual target is Win 2003 server, but want to test out everything prior to moving to my production platform.

    Thoughts?
  • Re: Could not access 'CDO.Message' object. (Proper SMTP settings!!!)

    04-12-2005, 12:52 PM
    • Participant
      830 point Participant
    • liffey
    • Member since 05-20-2003, 2:00 PM
    • Dublin, Ireland
    • Posts 166

    FYI

    I was having the same problem on a WinXP box trying to send email through to a Win2003 Server box. Having read all threads referencing CDO I eventually tracked down the problem.  It had worked before but "suddenly" stopped.

    My problem had been caused by an upgrade to McAfee Virusscan 8.  In this there is a setting which blocks port 25 to protect against mass mailing worms. Turning this off solved my problem.

    Declan

     

  • Re: Could not access 'CDO.Message' object. (Proper SMTP settings!!!)

    04-12-2005, 1:23 PM
    • Contributor
      7,163 point Contributor
    • ErikVB
    • Member since 12-10-2004, 1:14 PM
    • Netherlands
    • Posts 1,433
    • TrustedFriends-MVPs

    Ahh, the virus scanner makes sense. I heard of someone that had the same problem (with macafee enterprise 8) ... Why in earth would a virusscanner block ports actively? That means if the can't kill the worm, they just kill everything .... Huh? [:^)]

    Beer [B]cheers,

    erik

     

    Erik van Ballegoij, The Netherlands
  • Re: Could not access 'CDO.Message' object. (Proper SMTP settings!!!)

    04-13-2005, 11:39 AM
    • Member
      45 point Member
    • wvaneck
    • Member since 04-01-2005, 4:14 AM
    • Langdon, AB
    • Posts 12

    Hi,

    DNN uses the webmail component from the .Net framework. The webmail component is dependent on the cdosys.dll. This is dll gets installed in your windows\system32 directory when you install the SMTP service.

    No SMTP service no cdosys.dll, means no web mail. It just doesn't matter if you connect to a remote server or not.

    Try to place a copy from your web server on your stand-alone machine and register the dll.

    Wouter

Page 1 of 2 (22 items) 1 2 Next >