SendSMTPMail (recipients, attachmentPath, subject, message, attachmentFileName)

A script handler that takes over the job of sending SMTP mail.

When MoneyWorks has an email + attachment to send and the preferences are set to send via SMTP, the job is usually handed off to the sendEmail perl script.

In v8.1.7 and later, if there is a script handler named SendSMTPMail, then that handler will be called instead (note: if there are multiple such handlers, they will all be called, potentially resulting in the message being sent multiple times)

recipients may be a single recipient or a comma-delimited list

attachmentPath is the posix or windows path to the file to be attached

subject is the email subject

message is the plain text message; may be blank

attachmentFileName is a suggested attachment name which may differ from the actual filename of the attachmentPath (e.g. "Invoice 1234.pdf")

Automatically called:  When a message needs to be sent via SMTP

Use for:  Customising SMTP sending behaviour

Availability:  MoneyWorks Gold 8.1.7 and later.