[thelist] Sending mail problem with ASP/CDO

Joshua Olson joshua at waetech.com
Fri Feb 25 10:26:12 CST 2005


> -----Original Message-----
> From: Tom Dell'Aringa
> Sent: Friday, February 25, 2005 11:00 AM
> 
> (with real email addresses of course)
> 
> I get this 500 error:
> 
> COM Error Number  	-2147220960 (0x80040220)
> File Name 	/SVM1/Handbook/process-contact.asp
> Line Number 	9
> Brief Description 	The "SendUsing" configuration value is invalid.

Tom,

Try this code instead:

    Set objCDO      = CreateObject("CDO.Message")
    Set objCDOConfig  = CreateObject("CDO.Configuration")
    Set objFields    = objCDOConfig.Fields
        
    With objFields
      .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"127.0.0.1"
      .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
= 25
      .Item("http://schemas.microsoft.com/cdo/configuration/SendUsing") = 2
      .Update
    End With
    
    With objCDO
      .Configuration  = objCDOConfig
      .To          = RECIPIENT_EMAIL
      .From        = SENDER_EMAIL
      .Subject     = MESSAGE_SUBJECT
      .TextBody    = MESSAGE_BODY
      .Send
    End With
    
    Set objFields = Nothing
    Set objCDO = Nothing
    Set objCDOConfig = Nothing 

Switch out the values in the "With objFields" block as appropriate.

<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com/service_areas/
706.210.0168 




More information about the thelist mailing list