Email Configuration window

The Email Configuration window is shown when you click the Email Settings button.

All Email Fields If set, these fields work with the Email Contents setting to provide default values for the default mail client when it is launched. If the first character is an '@' then the rest of the text is taken to be a filename and the text is read from the file.
e.g. if the "Email Body" value was "@c:\body.txt" then the file c:\body.txt would be read in and this would be placed in the body of the email.

For the TO, CC, BCC address fields, several addresses may appear if the addresses are comma or white space separated. Some email applications require the "SMTP:" prefix on mail addresses to send SMTP style mail.


To The TO address field. e.g. info@broadgun.com
CC The Carbon Copy address field.
BCC The Blind Carbon Copy address field.
Subject The email subject.

"EnvironmentVars" class="anchor">Environment Variable Substitution
Any Windows environment variable can be used inside of the curly braces and the value is dynamically substituted to form the subject. Sophisticated control codes and tags can be used, as described here

e.g. if the subject is set to "Sent by {USERNAME} on %Y-%m-%d" and the user "Fred" is logged on then the subject will be "Sent by Fred on 2020-12-14".
Body The body of the email.  This text may contain html tags if the send method is not Simple MAPI.
Send Method Defines the mail transport.  The method to choose depends upon your environment.

Supported methods are:

Simple MAPI
Uses the Simple MAPI API for sending emails.  Most Windows based email clients support Simple MAPI. Simple MAPI does not work well with Microsoft Outlook. HTML emails are not supported.

Extended MAPI
This is a more sophisticated method than Simple MAPI. Can be used with email clients which support Extended MAPI eg Microsoft Outlook. It does support HTML. Emails will be sent from the default MAPI provider for your Windows installation. If this is Outlook the emails are sent from the default email account set up in the current Outlook profile.
 
Outlook
If this method is chosen Outlook must be installed.  Emails are sent from the default email account set up in the current Outlook profile. Read here for help if you are having difficulties sending by Outlook. HTML may be used in the body of the email.

SMTP
Use this if you wish pdfMachine to communicate directly to a SMTP server bypassing any mail client software. Support for SSL / TLS, eg gmail. HTML may be used in the body.
 
Lotus Notes
Make Lotus Notes the default MAPI provider. This will call pdfMachine when the send button is clicked.
Open Internet Explorer, go to the toolbar and select "tools", then "internet options", then the "Programs" tab.
In the Internet Programs group, at the E-mail: heading, select Lotus Notes which explains that the Outlook application has to be installed before Lotus Notes can be used for MAPI.

Outlook.com API
Send using Online Outlook.
Click the OUTLOOK.COM AUTHORIZATION button to give pdfMachine permission to send using your online Outlook account.

Gmail API
Send using Gmail.
Click the GMAIL AUTHORIZATION button to give pdfMachine permission to send using your Gmail account.


SMTP Settings window

This window is shown when you click the SMTP Settings button on the Email Config window. If SMTP is the chosen transport, these settings must be configured:

From The email address that is placed in the "From" field.
Server The domain name of the email server.
Port number may optionally be specified by appending a colon followed by a number.
If no port number is specified, it will default according to the Security setting below, where "TLS" defaults to port 587, "SSL" defaults to port 465, "None" defaults to port 25.
User SMTP email server login username.
Password SMTP email server login password.
Security SMTP email connection encryption security.
None = No encryption, TLS = Transport Layer Security, SSL = Secure Socket Layer.
If no port number is on the server name, the default port number for the security type selected here is used.

Email Settings

The email settings control what pdfMachine will set as default for the To, Cc, Bcc, Body, Subject and Extra Attach fields in the email content.

Valid Values Action
Empty settings The To, Cc, Bcc, Body, Subject and Extra Attach fields will be blank by default.
Note: This is the same as having "Use saved settings in email" unchecked in version 14.86 and earlier.
Last used settings Default. Allows you to default to the email details last used.
The To, Cc, Bcc, Body, Subject and Extra Attach fields will be used are those that were either saved from the Email Config dialog or last sent using the pdfMachine Compose Email window.
Note: This is the same as having "Use saved settings in email" checked in version 14.86 and earlier.
As configured The Email Configuration dialog can be used in this way to store a template for emails.
The To, Cc, Bcc, Body, Subject and Extra Attach fields will be used are those that saved from the Email Config dialog. Changes made during a send will not affect the defaults for the next email.

Confirm Email Attachment Name

If checked, the user will be prompted to confirm or change the name of the PDF attachment when the "send" button is pressed.

Automatically send email if "Email To: is set"

If checked, and an "Email To:" value is supplied the mail is sent automatically.

Send Using Outlook

To send using Outlook you can choose a send method of either Outlook or Extended MAPI. Choosing Outlook as the send method will allow you to use the Outlook "Compose Mail" dialog.

The Outlook account must be in the profile selected in Outlook.

Error Handling

If you are using Outlook as your Email Send Method and your emails are being sent with a different font than the default you have set up within Outlook this is due to an existing issue with Outlook. To work around it you need to fix it from within Microsoft Word:
(1) Open Word
(2) Go to Options -> Advanced -> Web Options
(3) Change the default font in the Fonts tab"

Error Handling

If you receive an error when Outlook is your send method you should first ensure that


Outlook Security Warning

If you don't have up to date anti-virus software running then Outlook may prompt with a security warning when sending each email.

If you can't update your anti-virus software you can turn it off in Outlook.
Read this for Microsoft's suggestions on how to configure your PC to avoid this. Note : although registry changes are listed as suggestions, it is usually sufficient to change the settings using the Outlook user interface.

If you can't resolve it this way then you should use Extended MAPI as your send method instead.


Outlook not found

Microsoft Windows requires you to run any program that accesses Microsoft Outlook in the same security context (privileges/elevation) as that in which Microsoft Outlook is running.

Typically, that means either 'Run As Administrator' or not. The Windows UAC system will not allow a calling application that is running at a higher privilege level to make a call to an application running at a lower privilege level.

After installation it is necessary to reboot, then log back in again in order to send using Outlook as the send method.

If you get this message even after a reboot then you will need to do one of the two things


Outlook has returned an unspecified error for one or more of the following email recipients...

Make sure there are no message boxes awaiting acknowledgement.

Outlook will attempt to 'resolve names'. Check that your To/Cc/Bcc emails all resolve to a valid email address.

Send using Gmail

You should use the Gmail API method to send using Gmail. Older versions used SMTP.

SMTP settings when using gmail

Example settings for SMTP via gmail

From : youraddress@gmail.com
Server : smtp.gmail.com
User : youraddress@gmail.com
Password : ****
Security : TLS
Click here for the gmail settings page.


Less Secure Apps

pdfMachine uses user name and password authentication, therefore you need to switch on Less Secure Apps in your gmail settings.


Two Step Authentication

If you have two-factor authentication on your Google account then you need to set up an app-specific password for pdfMachine to access gmail.