Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

E mail attachment

Hi All,

Is there anybody who completes the e mail attachment as pdf in qlikview. if so please help me to send the code. I have tried but not works.

Thanks

Renjith Kumaran

4 Replies
Not applicable
Author

Not applicable
Author

thanks pari

Not applicable
Author

Hi,

I have tried the link you sent. its creates the pdf and then fails to mail. I tried a lot, no use.

here is my mailing code

function mailrapport()

    Dim objEmail

    Const cdoSendUsingPort = 2     ' Send the message using SMTP

    Const cdoAnonymous = 0     'Do not authenticate

    Const cdoBasic = 1         'basic (clear-text) authentication

    Const cdoNTLM = 2         'NTLM

    SMTPServer = "smtp.live.com"

    Const SMTPPort = 25                 ' Port number for SMTP

    Const SMTPTimeout = 60              ' Timeout for SMTP in seconds

    '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

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

    End With

    objEmail.To = "rkumaran@ustechdata.com"        'Email Recipient

    objEmail.From = "renjithk@live.com"                        'Email Sender

    objEmail.Subject = "The name of the report"                        ' Subject

    objEmail.TextBody = "some text in the body of the mail"        'Text Body         

    objEmail.AddAttachment   "c:\PDFs\Operations\transactierapportPDP.pdf"    ' Attachement

    objEmail.Send

    Set objFlds = Nothing

    Set objConf = Nothing

    Set objEmail = Nothing

end function

Not applicable
Author

Please treat this as closed...

Thanks

Renjith Kumaran