Kaseya Community

Script to email pdf attachement

  • I modified a script from the forum to email me a report but my problem is the report is a pdf and not txt. I would like a script that will email pdf attachements. Anyway to do this?
    Here is what I have so far:

    Script Name: NU Report
    Script Description: email the latest Night Utility Report

    IF True
    THEN
    Use Credential
    OS Type : 0
    Get File
    Parameter 1 : c:\temp\Print WNIGHT Error Log.pdf
    Parameter 2 : c:\temp\NUReport.pdf
    Parameter 3 : 0
    OS Type : 0
    Get Variable
    Parameter 1 : 1
    Parameter 2 : c:\temp\Print WNIGHT Error Log.pdf
    Parameter 3 : NUReport
    OS Type : 0
    Send Email
    Parameter 1 : user@domain.com
    Parameter 2 : Night Utility Report
    Parameter 3 : #NUReport#
    OS Type : 0
    ELSE

    Legacy Forum Name: Script to email pdf attachement,
    Legacy Posted By Username: Kenny
  • I dont have a script that will email attachments, but I do have a tool that (from the command line) will convert PDFs to TXT files. The tool can be found at http://www.foolabs.com/xpdf/

    God Bless,
    Marty

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: Missing Link
  • Once Marty's tool is used to convert the pdf to TXT files, you can then use a variable to get the contents of the text file and then send an email using the contents variable to send the email without an attachment!

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: TBK Consulting