locked
CDO.Message.1 error '80040220' RRS feed

  • Question

  • Hi all,

    CDO.Message.1 error '80040220'

    The "SendUsing" configuration value is invalid. 

    /confirm.asp, line 81

    Am getting this error .. .Can you please this my code :

    <%

    Dim contactName, email, companyName, phone, street, city, zip, website, state, comments, business, bestContactTime, mailSubject, fn, thefilename, isDownload, downloadText, siteAction

     

    contactName=Request.Form("Contact_Name")

    companyName=Request.Form("Company_Name")

    street=Request.Form("Street")

    city=Request.Form("City")

    state=Request.Form("State")

    zip=Request.Form("Zip")

    phone=Request.Form("phone")

    email=Request.Form("email")

    website=Request.Form("Website")

    bestContactTime=Request.Form("Best_Contact_Time")

    business=Request.Form("business")

    comments=Request.Form("Comments")

    fn=Request.Form("fn")

    isDownload="zero"

    downloadText=""

    mailSubject = "Information Request from Website"

    siteAction = "Information Request"

     

    If fn = "b" Then

    thefilename = "/dfiles/Small Business Manufacturing Brochure.pdf"

    isDownload="one"

    downloadText="Click here to download the file."

    siteAction = "Downloaded SBM Brochure"

    End If

     

    If fn = "qb" Then

    thefilename = "/dfiles/SBM Quickbooks Brochure.pdf"

    isDownload="one"

    downloadText="Click here to download the file."

    siteAction = "Downloaded SBM for QuickBooks Brochure"

    End If

     

    If fn = "bl" Then

    thefilename = "/dfiles/Dynamics GP Bill of Lading Brochure.pdf"

    isDownload="one"

    downloadText="Click here to download the file."

    siteAction = "Downloaded Bill of Lading Brochure"

    End If

     

    If fn = "t" Then

    thefilename = "/dfiles/SmallBusinessManufacturing.msi"

    isDownload="one"

    downloadText="Click here to download the file"

    siteAction = "Downloaded SBM demo"

    End If

     

    If fn = "qd" Then

    thefilename = "/dfiles/QBSBM.exe"

    isDownload="one"

    downloadText="Click here to download the file."

    siteAction = "Downloaded SBM for QuickBooks Demo"

    End If

     

    If fn = "bld" Then

    thefilename = "/dfiles/DynamicsGPBillofLading.msi"

    isDownload="one"

    downloadText="Click here to download the file."

    siteAction = "Downloaded Bill of Lading Demo"

    End If

     

    Dim myMail

       Set myMail = CreateObject("CDO.Message")

       myMail.Subject = mailSubject

       myMail.From = contactName & " <" & email & ">"

       myMail.To = "info@osbornecharles.com"

       myMail.TextBody = mailSubject & ""_ 

    & VBCrLf & VBCrLf & "Site Action: " & siteAction & ""_  

    & VBCrLf & VBCrLf & "Contact Name: " & contactName & ""_  

    & VBCrLf & "Company Name: " & companyName & ""_  

    & VBCrLf & VBCrLf & "Address: " & VBCrLf & street & ""_  

    & VBCrLf & city & ", " & state & " " & zip & ""_  

    & VBCrLf & VBCrLf & "Phone: " & phone & ""_  

    & VBCrLf & "Email: " & email & ""_  

    & VBCrLf & "Website: " & website & ""_  

    & VBCrLf & VBCrLf & "Best Contact Time: " & bestContactTime & ""_  

    & VBCrLf & "Interested Software: " & business & ""_  

    & VBCrLf & VBCrLf & "Comments: " & VBCrLf & comments & VBCrLf  

       myMail.Send

       Set myMail = Nothing 

    %>

    Let me know wherer i have to change code 

     


    kavitha
    • Moved by Kee Poppy Friday, November 18, 2011 7:39 AM (From:Visual Basic Interop and Upgrade)
    Friday, November 11, 2011 12:59 PM

All replies

  • See if the below links help:

    http://forums.iis.net/t/1146477.aspx

    http://support.microsoft.com/kb/322338 


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Friday, November 11, 2011 3:42 PM
  • Thanks for your reply...

    i chenged my code like :

    <%

    Dim contactName, email, companyName, phone, street, city, zip, website, state, comments, business, bestContactTime, mailSubject, fn, thefilename, isDownload, downloadText, siteAction

     

    contactName=Request.Form("Contact_Name")

    companyName=Request.Form("Company_Name")

    street=Request.Form("Street")

    city=Request.Form("City")

    state=Request.Form("State")

    zip=Request.Form("Zip")

    phone=Request.Form("phone")

    email=Request.Form("email")

    website=Request.Form("Website")

    bestContactTime=Request.Form("Best_Contact_Time")

    business=Request.Form("business")

    comments=Request.Form("Comments")

    fn=Request.Form("fn")

    isDownload="zero"

    downloadText=""

    mailSubject = "Information Request from Website"

    siteAction = "Information Request"


    If fn = "b" Then

    thefilename = "/dfiles/Small Business Manufacturing Brochure.pdf"

    isDownload="one"

    downloadText="Click here to download the file."

    siteAction = "Downloaded SBM Brochure"

    End If


    If fn = "qb" Then

    thefilename = "/dfiles/SBM Quickbooks Brochure.pdf"

    isDownload="one"

    downloadText="Click here to download the file."

    siteAction = "Downloaded SBM for QuickBooks Brochure"

    End If


    If fn = "bl" Then

    thefilename = "/dfiles/Dynamics GP Bill of Lading Brochure.pdf"

    isDownload="one"

    downloadText="Click here to download the file."

    siteAction = "Downloaded Bill of Lading Brochure"

    End If


    If fn = "t" Then

    thefilename = "/dfiles/SmallBusinessManufacturing.msi"

    isDownload="one"

    downloadText="Click here to download the file"

    siteAction = "Downloaded SBM demo"

    End If


    If fn = "qd" Then

    thefilename = "/dfiles/QBSBM.exe"

    isDownload="one"

    downloadText="Click here to download the file."

    siteAction = "Downloaded SBM for QuickBooks Demo"

    End If


    If fn = "bld" Then

    thefilename = "/dfiles/DynamicsGPBillofLading.msi"

    isDownload="one"

    downloadText="Click here to download the file."

    siteAction = "Downloaded Bill of Lading Demo"

    End If


    Dim myMail

       Set myMail = CreateObject("CDO.Message")

       myMail.Subject = mailSubject

       myMail.From = contactName & " <" & email & ">"

       myMail.To = "info@osbornecharles.com"

       myMail.TextBody = mailSubject & ""_ 

    & VBCrLf & VBCrLf & "Site Action: " & siteAction & ""_  

    & VBCrLf & VBCrLf & "Contact Name: " & contactName & ""_  

    & VBCrLf & "Company Name: " & companyName & ""_  

    & VBCrLf & VBCrLf & "Address: " & VBCrLf & street & ""_  

    & VBCrLf & city & ", " & state & " " & zip & ""_  

    & VBCrLf & VBCrLf & "Phone: " & phone & ""_  

    & VBCrLf & "Email: " & email & ""_  

    & VBCrLf & "Website: " & website & ""_  

    & VBCrLf & VBCrLf & "Best Contact Time: " & bestContactTime & ""_  

    & VBCrLf & "Interested Software: " & business & ""_  

    & VBCrLf & VBCrLf & "Comments: " & VBCrLf & comments & VBCrLf

     

         myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtpout.secureserver.net"

         myMail.Configuration.Fields.Update

         myMail.Send

         Set myMail = Nothing

    %>

    Let me know this is correct to find SMTP server name :

    Microsoft Outlook -> File ->Accounting Settings-> Name (myname) -> i went to Change account window -> i found SMTP server name : 

    Note: i try with this SMTP server name and again i got same error 

     

    CDO.Message.1 error '80040220'

    The "SendUsing" configuration value is invalid. 

    /confirm.asp, line  90

     

     


    kavitha
    Monday, November 14, 2011 12:05 PM
  • You still received the same error after correct specify the CDO configuration? Then it is probably caused by inadequate permissions on the IIS Metabase. Hope resources below may give you some ideas.

    For how to specify CDO configuration:http://forum.hostek.com/showthread.php?70-CDO.Message.1-error-80040220-The-quot-SendUsing-quot-configuration-value-is-invalid

    ApplicationPoolIdentity, Metabase:

    http://forums.iis.net/t/1164349.aspx

    http://blogs.msdn.com/b/akashb/archive/2010/05/24/error-cdo-message-1-0x80040220-the-quot-sendusing-quot-configuration-value-is-invalid-on-iis-7-5.aspx

    Have a nice day,


    Kee Poppy [MSFT]
    MSDN Community Support | Feedback to us

    • Edited by Kee Poppy Tuesday, November 15, 2011 7:49 AM add more info
    Tuesday, November 15, 2011 7:33 AM
  • Thanks your reply...

    Now i got onther error like :

    CDO.Message.1 error '80040213'

    The transport failed to connect to the server.

    /confirm.asp, line 91

    This code i used..

    Dim myMail

    Dim objCDOConf 

       Set objCDOConf =Server.CreateObject("CDO.Configuration")

      with objCDOConf

         .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtpout.secureserver.net"

         .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

         .Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

         .Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

         .Fields.Update 

    End With

       Set myMail = CreateObject("CDO.Message")

         Set myMail.Configuration = objCDOConf

          myMail.Subject = mailSubject

       myMail.From = contactName & " <" & email & ">"

       myMail.To = "info@osbornecharles.com"

       myMail.TextBody = mailSubject & ""_ 

    & VBCrLf & VBCrLf & "Site Action: " & siteAction & ""_  

    & VBCrLf & VBCrLf & "Contact Name: " & contactName & ""_  

    & VBCrLf & "Company Name: " & companyName & ""_  

    & VBCrLf & VBCrLf & "Address: " & VBCrLf & street & ""_  

    & VBCrLf & city & ", " & state & " " & zip & ""_  

    & VBCrLf & VBCrLf & "Phone: " & phone & ""_  

    & VBCrLf & "Email: " & email & ""_  

    & VBCrLf & "Website: " & website & ""_  

    & VBCrLf & VBCrLf & "Best Contact Time: " & bestContactTime & ""_  

    & VBCrLf & "Interested Software: " & business & ""_  

    & VBCrLf & VBCrLf & "Comments: " & VBCrLf & comments & VBCrLf

       myMail.Send

       Set myMail = Nothing

    %>

    Let me know still where it raising error 


     



    kavitha
    Tuesday, November 15, 2011 9:03 AM
  • The error message indicates you did not connect to the right SMTP server.

    Microsoft Outlook -> File ->Accounting Settings-> Name (myname) -> i went to Change account window -> i found SMTP server name : 

    I am afraid this is not the right way to get the server name. Are you doing this in your office? You may ask administrator for this. Also, make sure you have access to the server.

    Have a nice day,


    Kee Poppy [MSFT]
    MSDN Community Support | Feedback to us
    Tuesday, November 15, 2011 9:41 AM
  • yes am doing in my office only ... 

    My Project manager given smtp server like that only..

    am in the dought is this way correct or not..


    kavitha
    Tuesday, November 15, 2011 10:05 AM
  • Hmm..I think you can try below forums for further assistance, as this forum is for questions regards upgrading to VB.NET.

    IIS: http://forums.iis.net/

    VBScript: http://social.technet.microsoft.com/Forums/en/ITCG/threads

    Have a nice day,


    Kee Poppy [MSFT]
    MSDN Community Support | Feedback to us
    Wednesday, November 16, 2011 5:20 AM
  • Hi, 
    When i try to send mail with id :xxxxx@gmail.com it is giving error like : error '8004020e'
    If i used like(E-Mail address blocked: See forum rules) then it is nor raising any error ... am in the confusion... can you please tell me where i did a mistake ...
    Dim myMail
    Dim objCDOConf 
       Set objCDOConf =Server.CreateObject("CDO.Configuration")
      with objCDOConf
         .Fields("(URL address blocked: See forum rules)") = "Relay-hosting.secureserver.net"
         ' .Fields("(URL address blocked: See forum rules)")="localhost"
         .Fields("(URL address blocked: See forum rules)") = 25
         .Fields("(URL address blocked: See forum rules)") = 2
    .Fields("(URL address blocked: See forum rules)") = 60
     .Fields.Update 
    End With
       Set myMail = CreateObject("CDO.Message")
      
       Set myMail.Configuration = objCDOConf
       myMail.Subject = mailSubject
       myMail.From = contactName & " <" & email & ">"
       myMail.To = "info@osbornecharles.com"
      
        
       myMail.TextBody = mailSubject & ""_ 
    & VBCrLf & VBCrLf & "Site Action: " & siteAction & ""_  
    & VBCrLf & VBCrLf & "Contact Name: " & contactName & ""_  
    & VBCrLf & "Company Name: " & companyName & ""_  
    & VBCrLf & VBCrLf & "Address: " & VBCrLf & street & ""_  
    & VBCrLf & city & ", " & state & " " & zip & ""_  
    & VBCrLf & VBCrLf & "Phone: " & phone & ""_  
    & VBCrLf & "Email: " & email & ""_  
    & VBCrLf & "Website: " & website & ""_  
    & VBCrLf & VBCrLf & "Best Contact Time: " & bestContactTime & ""_  
    & VBCrLf & "Interested Software: " & business & ""_  
    & VBCrLf & VBCrLf & "Comments: " & VBCrLf & comments & VBCrLf
        myMail.Send
        Set myMail = Nothing
        Set objCDOConf=Nothing
     
    %>

    kavitha
    Thursday, November 17, 2011 5:11 AM
  • I want know that you had solve this problem.CDO.Message.1 错误 '80040220'.And how to config a smtp on iis10.excactly win10
    Sunday, September 9, 2018 12:31 PM