Error in sending mails ! RRS feed

  • Question

  • I am trying to send email thro DTS using Activex Script.

    Here is the code :


    '  Visual Basic ActiveX Script

    Function Main()
     const SMTP_SERVER = "MPBAKOREX01.corp.mphasis.com"


    set iMsg = CreateObject("CDO.Message")
    set iConf = CreateObject("CDO.Configuration")
    Set Flds = iConf.Fields

    With Flds
    http://schemas.microsoft.com/cdo/configuration/sendusing") =      cdoSendUsingPickup
    http://schemas.microsoft.com/cdo/configuration/smtpserver") =      SMTP_SERVER
    http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 90
    End With

    With iMsg
             Set .Configuration = iConf
            .To = "
            .From = "
            .Subject = "TEST"
            .HTMLBody = "jfldsajfldk;sajf ;lksadjf;lkasdjlfkjasdlkfjlasdkj flkdsajflsadjf ljasdlf a"      
    End With

     Main = DTSTaskExecResult_Success
    End Function



    When i am executing this , i am getting the following error :

    Error Source : Microsoft Data Transformation Services (DTS) Package

    Error Description : Error Code: 0

    Error Source= CDO.Message.1

    Error Description: The "SendUsing" configuration value is invalid.



    Error on Line 27



    How to solve it ?


    Tuesday, January 9, 2007 7:30 AM


  • Hi,

    You question has nothing to do with SSIS (or DTS) and more about CDO programming in VBScript. This is SSIS group, I doubt you'll find many CDO experts here.

    The best advice you'll get in this forum is to move to SSIS - there is a nice SMTP Mail Task that will likely do what you need.


    Tuesday, January 9, 2007 8:09 AM

All replies