SendMail
DocOrigin supports the sending of emails through two main mechanisms:
- Using a Form template (
_email_5
for instance) that lays out the email header information as well as the actual email message body directly within Design. This is covered in more detail in the Auto Email section. - Using the JavaScript
_sendmail
function to send emails. This can be used in all DocOrigin script-enabled functions: Merge, RunScript, FolderMonitor, etc.
Both schemes use the same underlying DocOriginSendMailServer executable to send the actual messages.
The DocOrigin _sendmail
function relies on the use of the cURL external executable to interface with an email server (via SMTP) and send the actual messages. This package is provided in the DocOrigin Install for the Windows environment and is freely available online for other platforms.
Settings must be configured via an overridable DocOriginSendMailServer.prm
file or via command line parameters (as of 3.2.001.01). Your SMTP host, access user/passwords, port number, and default "from" address must be configured in order for _sendmail
to work.
When _sendmail
is called you can specify whether the message is to be sent immediately or whether it can be queued to send later. This option is part of the _sendmail
function parameter settings. This option is typically adjusted for performance reasons in certain email environments.
When messages are queued for sending, a DocOriginSendMailServer
is automatically run to process these message files and do the actual email transmission via an SMTP email server. The queue option results in much better overall email throughput.
See the _sendmail
function description for more details on using the JavaScript _sendmail
function and Auto Email for details on embedding automatic emailing into your DocOrigin Design.