Results 1 to 3 of 3

Thread: CDO.Message.1 error '80040220' The "SendUsing" configuration value is invalid.

  1. #1
    Join Date
    May 2009
    Location
    Tulsa, OK
    Posts
    220

    Default CDO.Message.1 error '80040220' The "SendUsing" configuration value is invalid.

    The solution to CDO.Message.1 error '80040220' The "SendUsing" configuration value is invalid. is to give the CDO instance the Configuration settings it needs.

    The error will look like:
    HTML Code:
    CDO.Message.1 error '80040220' 
    
    The "SendUsing" configuration value is invalid.
    You probably have something like:
    Code:
    Set objMail = Server.CreateObject("CDO.Message")
    objMail.From = argFromAddress
    objMail.To = argToAddress 
    objMail.Subject = argSubject
    objMail.htmlBody = argBody
    objMail.send
    set objMail = Nothing
    To add the CDO Configuration that it needs, you need to change the code to be like:
    Code:
    Set objCDOConf = Server.CreateObject ("CDO.Configuration")
    ' ** SET AND UPDATE FIELDS PROPERTIES **
    With objCDOConf
        ' ** OUT GOING SMTP SERVER **
        .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "SMTP_SERVER_HERE"
        ' ** SMTP PORT **
        .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
        ' ** CDO PORT **
        .Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
        ' ** TIMEOUT **
        .Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
        .Fields.Update 
    End With
    
    
    Set objMail = Server.CreateObject("CDO.Message")
    
    ' ** UPDATE THE CDOSYS CONFIGURATION **
    Set objMail.Configuration = objCDOConf
    
    objMail.From = argFromAddress
    objMail.To = argToAddress 
    objMail.Subject = argSubject
    objMail.htmlBody = argBody
    objMail.send
    
    Set objCDOConf = Nothing
    set objMail = Nothing
    This is a very basic example. You would of course want error checking and handling, etc.

  2. #2
    shant1976 Guest

    Default Thread: CDO.Message.1 error '80040220' The "SendUsing" configuration value is invali


  3. #3
    namoguy Guest

    Default Thanks

    Even after all this time still fixed my issue. Love supporting old apps. Thanks for your post

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •