PDF Automailer

With the Aloaha PDF Automailer it is possible to automatically send your PDFs by mail. You control the mailer by embedded commands.

Embedded commands in this context means that you can write defined commands into the original PDF and Aloaha will execute them after the document has been created. Ideally you write the commands in the same font color as the background. For example white font on white background.

Some embedded commands are also explained on page: ALOAHA PDF AUTOMATION COMMANDS

The embedded commands are defined in HKCU\Software\Aloaha\pdf\automailer and  HKLM\SOFTWARE\<Wow6432Node>\Aloaha\pdf\automailer in Regular Expression syntax. If needed you can change those search pattern.

Standard embedded commands to send a simple email are: subject:, emailto:,  emailcc:, emailbcc, pdfname:, attachment:, subject:, body:, attachmentPDF:, appendPDF:

The difference between the command attachment: and attachmentPDF: is very easy. The first command attaches the file to the email and the second command attaches the file to the PDF itself.

The very important keyword RemoveFirstPage deletes the first page of the generated PDF document. This is ideal to place the commands on the first page but then remove this first page from the final PDF Document. You can try it yourself. Just print the following document to your Aloaha PDF Printer: test.docx

eMail Templates

Even though the command body: is sufficient for small emails it is sometimes required to use quite complex or long emails. In that case it is best you use one of the email template functions. Aloaha allows Text (ASCII), HTML and EML Templates.

The embedded commands required are: TextPath:, HTMLPath: and EMLPath:

In case you are using for every mail the same template you can also configure it permanently in


Just create a key textpath, htmlpath or emlpath in the above hive and point it the template file.

Execute Command

Sometimes it is required to call a command after the PDF has been created. For example to create a zip file with supporting documents.

That can be accomplished with the exec: command followed by the path to the file to be executed.

Let’s say you need to pass parameters to the above commands. Even that is possible with placeholder %0 to %10

For example you could pass the word Hello World directly in the exec command line or you define Hello World as: epara1: Hello World

You then write as exec command: exec: c:\batch\test.bat %1

A special meaning has placeholder %pdf%. That placeholder ALWAYS contains the path to the generated PDF document.

Since this command can be quite dangerous it must be enabled manually via registry key.Set HKLM\SOFTWARE\<Wow6432Node>\Aloaha\pdf\CommandLineEnabled to 1 to enable this feature.

With HKLM\SOFTWARE\<Wow6432Node>\Aloaha\pdf\CommandLineHidden 1 or 0 you can define if the command is executed in a hidden or visible windows

The default timeout value of 60 can be changed in HKLM\SOFTWARE\<Wow6432Node>\Aloaha\pdf\CommandLineTimeOut