Skip to content

ConvertHTMLAttachmentToPdfAndSend

Function

ConvertHTMLAttachmentToPdfAndSend(to,cc,bcc,body,company,subject,queueIfNotAbleToSend,pdfPageSize,attachmentName,attachmentDataBase64Encoded)

Description

Converts HTML data to PDF and emails it.

Arguments

  • to - An array of emails

  • cc - An array of emails, optional

  • bcc - An array of emails, optional

  • body - Body of the email, note that the Vablet template will be used so the output will not soley be this body

  • company - Company of the recipient, for logging purposes

  • subject - Subject of the email

  • queueIfNotAbleToSend - Continue trying to send the email until it succesfully goes through

  • pdfPageSize - The rendered PDF page size. It a a JSON object with width and height poperties. EX: {'width':pageSizeWidth,'height':pageSizeHeight}

  • attachmentDataBase64Encoded - The base64 encoded html to convert into a pdf

  • attachmentName - File name of attachment

Return

  • success, this is always set to true if queueIfNotAbleToSend is true. If queueIfNotAbleToSend is set then if the email is not immediatly sent it will remain in queue until it is