email merge from legacy applications
Email merge with attached PDF from a legacy application
pdfMachine ultimate provides the means to send a batch of emails with attached PDFs simply by printing a report from your legacy application. A report which prints as a single job with multiple reports one after the other is easily converted into an automated job which separates out and emails the reports as attached PDFs. You can set the specific email details (eg recipients, subject, attachment name and the body of the email) from the legacy application.
All you need to do is to insert a few lines into your legacy report to provide the email details and to indicate where to split the report into separate emails. pdfMachine does the rest.
How does it work?
The pdfMachine ultimate "parameter parsing" feature allows you to print commands in your legacy report which instruct pdfMachine what to do, in this case perform an email merge operation. You place a few extra lines of parameters in your report that are interpreted by pdfMachine yet do not appear in the end result. It is fast and easy to use.
You can also use parameter parsing to print the report onto your stationery to improve how it looks.
The PDFs can be encrypted / password protected.
Add the following text to your reports to split the PDFs and send emails. Make sure you print a page break before the beginning of each new report. Other parameters can be added if there are additional things you want done, eg adding Ccs to the email, saving the PDF.
#_ email email@example.com _# #_ emailsubject Invoice 2001 _# #_ emailbody Dear John, Attached is invoice 2001. Regards Phil _# #_ splitPDF 1 _#
Customer Name: John
Amount Owed: $100
Date Due: 23 Jan 2022
(make sure there is a page break before this next text)
#_ email firstname.lastname@example.org _# #_ emailsubject Invoice 2002 _# #_ emailbody Dear Dave, Attached is invoice 2002. Regards Phil _# #_ splitPDF 1 _#
Customer Name: Dave
Amount Owed: $200
Date Due: 23 Jan 2022
Print the report to pdfMachine. pdfMachine will now email out with individual PDFs attached.
Read more about parameter parsing commands here.