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 recipients, subject and 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.

Step 1

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 john@yourserver.com _#
#_ emailsubject Invoice 2001 _#
#_ emailbody Dear John, Attached is invoice 2001 for the month of January. Regards Phil _#
#_ splitPDF 1 _#
						

Customer Name: John
Amount Owed: $100
Date Due: 23 Jan 2014

..
..

  (make sure there is a page break before this next text)

#_ email dave@yourserver.com _#
#_ emailsubject Invoice 2002 _#
#_ emailbody Dear Dave, Attached is invoice 2002 for the month of January. Regards Phil _#
#_ splitPDF 1 _#
						

Customer Name: Dave
Amount Owed: $200
Date Due: 23 Jan 2014

..
..

Step 2

Configure the pdfMachine options.
Enable parameter parsing and set it up so that it doesn't print the parameters.
Set up your Email settings.

Step 3

Print the report to pdfMachine. pdfMachine will now email out with individual PDFs attached.