Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to insert signature in VBScript for sending emails from QlikView

Hi All,

I desperately in need of your help for inserting my outlook's default signature in the below VBScript for sending emails from QlikView

FUNCTION GlobalFEPSendReport() 

    Dim objEmail

    Const cdoSendUsingPort = 2    

    Const cdoAnonymous = 0    

    Const cdoBasic = 1         

    Const cdoNTLM = 2        

    SMTPServer = "xxxxx.bbb.com" 

    Const SMTPPort = 25                 

    Const SMTPTimeout = 60              

    'Sending mail 

    Set objEmail = CreateObject("CDO.Message") 

    Set objConf = objEmail.Configuration 

    Set objFlds = objConf.Fields 

    With objFlds 

        '--------------------------------------------------------------------- 

           ' SMTP server details 

           .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort 

           .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTPServer 

           .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoAnonymous  

        .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = SMTPPort 

        .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 

          .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = SMTPTimeout 

           .Update 

        '--------------------------------------------------------------------- 

msgbox "Mail Sent Successfully"

    End With 

    objEmail.To = ""        'Email Recipient 

    objEmail.cc = ""        'Email Recipient

    objEmail.From = ""                        'Email Sender 

    objEmail.Subject = "Report on Global FEP Alerts" & ":" & " " & PreviousWeekNum()         ' Subject 

    objEmail.HTMLBody = "Please find attached the report on Global FEP alerts for the" & " " & PreviousWeekNum() &_

    "<BR><BR>Thank You<BR>"

  

    objEmail.AddAttachment   ""    ' Attachement 

    objEmail.Send 

    Set objFlds = Nothing 

    Set objConf = Nothing 

    Set objEmail = Nothing 

END FUNCTION

0 Replies