How do I set up different email messages and sender addresses for different reports processed?


 I set up my PDF-eXPLODE configuration under Mail Settings screen with an email message and subject to send out customer Invoices each week. The Sender (From) address is shown under the Email Connection settings. So far everything is working great. After several months of successfully processing Invoices, I now would like to set up and send some internal reports each week.  However, I could not possibly use the same email subject and message nor can I use the Sender (From) address as shown in my images below. How can I set up two separate sets of email messages/subjects that are appropriate for the document being sent and how can I show a different Sender email address for each processing run?






There are three methods of achieving what you want.


Each report should be regarded as a “ Message (or Rule or Report) ID ”. A message ID is a “collection of rules related to a specific report or report type (for example - Invoicing or Statements or Remittance advices, etc.). In your present configuration, Mail Settings is a 'global settings' and is designed to apply to all reports. This has its use when running a bunch of reports which are a similar type (for example - sending only Invoices).  That works UNTIL you want one or more rules to be different for each process run (as in your case now- a different SENDER and email message ). So what you can do is create a Message ID called CUSTOMER (to run Invoices)  and one called REPORTS (to capture sending information related to the internal report distrubtion) and from the image below you can see you can set up specific emails / SENDER FROM addresses for each of Reports and Customer

Customer Message ID   Message ID Reports

Next you need to modify your Report Writer report tag to include the Message ID name so that PDF-eXPLODE knows that the report running must use the relevant Message ID rules configured. To do this, assume that your report tag currently has only an email address between the <pdfexplode> left and right nodes. Then we modify this tag to show as:

   <pdfexplode> Customer#{ email_address}</pdfexplode>   and 

   <pdfexplode> Reports#{ email_address}</pdfexplode>   

where you use the exact Message ID name BEFORE the database email address and include a “#” sign after the Message ID name and immediately before the email address. PDF-eXPLODE sees a ONE WORD name with a ‘#’ as being a Message ID and will use that rule and all of its content. So each report will have its own SENDER address and email message content. You can also add a CC or BCC in the Message ID rule if you wish. as well as a different exploded file path to separate the exploded file location for each report run.



In each of the report tags, we can include a hard coded text email address of the Sender as a Variable. If we also wanted to change the email message and subject, set some generic short message and subject as  variables and separated by a comma This change must be done in the tag in the report designer like this:

Report Customers:

<pdfexplode> ,   Your Invoice is attached, Please find attached your Invoice issued today. We would appreciate your prompt payment by the due date shown on the Invoice . % {email_address}</pdfexplode >

Here there are three variables : Var 1 is the Sender address which is regarded as a 'system' variable, Var 2 is the Subject and Var 3 is the email message which are used in the configuration screen and will change for each email depending on how the tag gets populated at run time. Please ensure you complete both screen as shown below 




Report Internal:

<pdfexplode> %{email_address}</pdfexplode >

Here you are including a variable which is a text you typed in to represent the desired FROM address. In this case there is no subject and message Var and they will appear blank in the email sent. 



In your current PDF-eXPLODE installation, there is a registry ( UseAdminINI=Y or N ) setting that generally controls how the pdfexplode.INI configuration settings file will be used at the time of processing a report. 

  • If the UseAdminINI is set to Y, in the registry (HKLM\Software\PDF-eXPLODE or HKLM\Software\Wow6432Node\PDF-eXPLODE for 64 B computers ) then ONLY the “Administrator folder pdfexplode.ini file (which was created by PDF-eXPLODE installation)  under [installed folder]\INIS\ is used. This is for control purposes.
  • However if UseAdminINI=N (which is the default for the Desktop license) is configured, then ANY User, logging on to the Desktop PC, will automatically have their own sub-folder created by PDF-eXPLODE under INIS sub-folder and it will contain a “blank” pdfexplode.INI which must be configured by you, BEFORE that user can run any processing under their User login when working on this PC. 

 At installation time, the Desktop license has a default registry setting of UseAdminINI=N and you can tell because your Options screen is using individual User logins and not the Administrator ” User ID. as shown in the image below:


If you are using a Desktop license, the configured pdfexplode.INI file will be found  under the sub-folder with your User ID login name. Let us assume this logon ID is RR_Machine

Create another User login called (say) RR_Internal and login to the same PC., Then start PDF-eXPLODE and it will automatically create a sub-folder called RR_Internal under [INSTALLED FOLDER]\INIS\ and will insert a blank pdfexplode.ini file into it. Exit from PDF-eXPLODE. Now copy the pdfexplode.ini from [INSTALLED FOLDER]\INIS\RR_MACHINE to the folder [INSTALLED FOLDER]\INIS\RR_INTERNAL.

Then reopen PDF-eXPLODE under the RR_Internal login and navigate to the Options screen. There you will change the FROM_SENDER default address within the Mail Settings screen to whatever you want. Save the file and exit PDF-eXPLODE.

Let us assume your tag is as follows in your report template: ({email_address} is the email database field that the report template is linked to)


When you run a report to PRINT to the PDFeXPLODE printer, the program will process the report distribution using the INI from the User whose login matches the user login ID.

 ALL processing of a report MUST be done under the correct login as PDF-eXPLODE will access and use the INI of the matching Login and in doing so, you will get the right Sender email address and the correct email subject and message.

There is NO changes required to your report Tag.

  Please also note that some servers will block the SENDER NAME used in report  from appearing on the email and will replace the name with the default email account. This happens in Gmail so the FROM ADDRESS is irrelevant if the FROM ADDRESS does not exist as a valid email box.



Posted - Fri, Nov 20, 2015 at 12:30 PM. This article has been viewed 2446 times.
Online URL:

Powered by PHPKB (Knowledge Base Software)