Last updated
Was this helpful?
Last updated
Was this helpful?
(plugins.mail)
The mail
plugin enables sending and receiving emails, with additional support for attachments, email validation, and property configuration. It supports creating binary and text-based attachments, specifying MIME types, and handling exceptions that occur during mail operations. The plugin can process incoming mail from POP3 accounts, with options for leaving messages on the server, retrieving headers, and filtering by sent date.
Emails can be sent individually or in bulk. Bulk emails are optimized to prevent responses such as "out of office" messages. The plugin supports HTML-formatted messages, multiple recipients, and optional CC/BCC configurations. Additional customization is available through SMTP host settings and override properties. Attachments can be added as single files or arrays, providing flexibility for diverse email content. Utility methods like email address validation and plain address extraction are also available.
,,
Returns the value of the mail.
Creates a binary attachment object.
Creates a binary attachment object.
Creates a text based attachment objec with the default 'text/plain' mimetype
Creates a text based attachment object.
Get the exception that occurred in the last sendMail attempt (null if no exception occurred).
Helper method, returns MailMessage object from binary or 7bits string.
Helper method to only get the plain addresses.
Checks whether the given e-mail address is valid or not.
Receive mails from pop3 account.
Receive mails from pop3 account.
Receive mails from pop3 account.
Receive mails from pop3 account.
Receive mails from pop3 account.
Send a bulk mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting).
Send a bulk mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting).
Send a bulk mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting).
Send a bulk mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting).
Send a bulk mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting).
Send a bulk mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting).
Send a bulk mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting).
Send a bulk mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting).
Send a bulk mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting).
Send a mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting).
Send a mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting).
Send a mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting).
Send a mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting).
Send a mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting).
Send a mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting).
Send a mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting).
Send a mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting).
Send a mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting).
Returns the value of the mail.from property which is set on the admin page.
Sample
Creates a binary attachment object.
Parameters
Sample
Creates a binary attachment object.
Parameters
Sample
Creates a text based attachment objec with the default 'text/plain' mimetype
Parameters
Sample
Creates a text based attachment object.
Parameters
Sample
Get the exception that occurred in the last sendMail attempt (null if no exception occurred).
Sample
Helper method, returns MailMessage object from binary or 7bits string.
Parameters
Sample
Helper method to only get the plain addresses.
Parameters
Sample
Checks whether the given e-mail address is valid or not.
Parameters
Sample
Receive mails from pop3 account.
Parameters
Sample
Receive mails from pop3 account.
Parameters
Sample
Receive mails from pop3 account.
Parameters
Sample
Receive mails from pop3 account.
Parameters
Sample
Receive mails from pop3 account.
Parameters
Sample
Send a bulk mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting). A bulk email makes it possible for one to not receive "out of office" emails back from receiver.
Parameters
Sample
Send a bulk mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting). A bulk email makes it possible for one to not receive "out of office" emails back from receiver.
Parameters
Sample
Send a bulk mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting). A bulk email makes it possible for one to not receive "out of office" emails back from receiver.
Parameters
Sample
Send a bulk mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting). A bulk email makes it possible for one to not receive "out of office" emails back from receiver.
Parameters
Sample
Send a bulk mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting). A bulk email makes it possible for one to not receive "out of office" emails back from receiver.
Parameters
Sample
Send a bulk mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting). A bulk email makes it possible for one to not receive "out of office" emails back from receiver.
Parameters
Sample
Send a bulk mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting). A bulk email makes it possible for one to not receive "out of office" emails back from receiver.
Parameters
Sample
Send a bulk mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting). A bulk email makes it possible for one to not receive "out of office" emails back from receiver.
Parameters
Sample
Send a bulk mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting). A bulk email makes it possible for one to not receive "out of office" emails back from receiver.
Parameters
Sample
Send a mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting). If you want to have a different reply address than from, you can specify this with the from parameter by adding another email after it.
Parameters
Sample
Send a mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting). If you want to have a different reply address than from, you can specify this with the from parameter by adding another email after it.
Parameters
Sample
Send a mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting). If you want to have a different reply address than from, you can specify this with the from parameter by adding another email after it.
Parameters
Sample
Send a mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting). If you want to have a different reply address than from, you can specify this with the from parameter by adding another email after it.
Parameters
Sample
Send a mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting). If you want to have a different reply address than from, you can specify this with the from parameter by adding another email after it.
Parameters
Sample
Send a mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting). If you want to have a different reply address than from, you can specify this with the from parameter by adding another email after it.
Parameters
Sample
Send a mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting). If you want to have a different reply address than from, you can specify this with the from parameter by adding another email after it.
Parameters
Sample
Send a mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting). If you want to have a different reply address than from, you can specify this with the from parameter by adding another email after it.
Parameters
Sample
Send a mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting). If you want to have a different reply address than from, you can specify this with the from parameter by adding another email after it.
Parameters
Sample
Type
filename ;
binarydata ;
Returns: an Attachment object created with the specified filename and binary data, or null if the inputs are invalid.
filename ;
binarydata ;
mimeType ;
Returns: an Attachment object created with the specified filename, binary data, and MIME type, or null if the inputs are invalid.
filename ;
textdata ;
Returns: an Attachment object created with the specified filename and text data, using the default MIME type of ‘text/plain’, or null if the inputs are invalid.
filename ;
textdata ;
mimeType ;
Returns: an Attachment object created with the specified filename, text data, and MIME type, or null if the inputs are invalid.
Returns: The exception message from the last sendMail attempt, or null if no exception occurred.
binaryblob/string ;
Returns: a MailMessage object created from the provided binary or string data, or null if an error occurred.
addressesString ;
Returns: an array of plain email addresses extracted from the input string, or an empty array if no valid addresses are found.
email ;
Returns: true if the given email address is valid, false otherwise.
username ;
password ;
leaveMsgsOnServer ;
Returns: an array of MailMessage objects representing received mail, or null if an error occurred.
username ;
password ;
leaveMsgsOnServer ;
receiveMode ;
Returns: an array of MailMessage objects representing received mail, or null if an error occurred.
username ;
password ;
leaveMsgsOnServer ;
receiveMode ;
onlyReceiveMsgWithSentDate ;
Returns: an array of MailMessage objects representing received mail, or null if an error occurred.
username ;
password ;
leaveMsgsOnServer ;
receiveMode ;
onlyReceiveMsgWithSentDate ;
pop3Host ;
Returns: an array of MailMessage objects representing received mail, or null if an error occurred.
username ;
password ;
leaveMsgsOnServer ;
receiveMode ;
onlyReceiveMsgWithSentDate ;
properties ;
Returns: an array of MailMessage objects representing received mail, or null if an error occurred.
to A string containing 1 or multiple addresses separated by a comma.
from A string containing an address and optional reply addresses, separated by commas.
subject The subject of the bulk mail
msgText The message text
Returns: true if the bulk email is successfully sent to all specified recipients, or false if an error occurs.
to A string containing 1 or multiple addresses separated by a comma.
from A string containing an address and optional reply addresses, separated by commas.
subject The subject of the bulk mail
msgText The message text
cc One or more addresses separated by a comma
Returns: true if the bulk email, including “cc” recipients, is sent successfully, or false otherwise.
to A string containing 1 or multiple addresses separated by a comma.
from A string containing an address and optional reply addresses, separated by commas.
subject The subject of the bulk mail
msgText The message text
cc One or more addresses separated by a comma
bcc One or more addresses separated by a comma
Returns: true if the bulk email is delivered successfully to all specified recipients, including “cc” and “bcc”, or false in case of failure.
to A string containing 1 or multiple addresses separated by a comma.
from A string containing an address and optional reply addresses, separated by commas.
subject The subject of the bulk mail
msgText The message text
cc One or more addresses separated by a comma
bcc One or more addresses separated by a comma
attachment A single attachment
Returns: true if the bulk email with the specified attachment is sent without issues, or false otherwise.
to A string containing 1 or multiple addresses separated by a comma.
from A string containing an address and optional reply addresses, separated by commas.
subject The subject of the bulk mail
msgText The message text
cc One or more addresses separated by a comma
bcc One or more addresses separated by a comma
attachment A single attachment
smtpHost The smtp host
Returns: true if the bulk email with the specified attachment is sent without issues, or false otherwise.
to A string containing 1 or multiple addresses separated by a comma.
from A string containing an address and optional reply addresses, separated by commas.
subject The subject of the bulk mail
msgText The message text
cc One or more addresses separated by a comma
bcc One or more addresses separated by a comma
attachment A single attachment
overrideProperties An array of properties
Returns: true if the bulk email with the specified attachment is sent without issues, or false otherwise.
to A string containing 1 or multiple addresses separated by a comma.
from A string containing an address and optional reply addresses, separated by commas.
subject The subject of the bulk mail
msgText The message text
cc One or more addresses separated by a comma
bcc One or more addresses separated by a comma
attachments The attachments
Returns: true if the bulk email with the specified attachments is sent without issues, or false otherwise.
to A string containing 1 or multiple addresses separated by a comma.
from A string containing an address and optional reply addresses, separated by commas.
subject The subject of the bulk mail
msgText The message text
cc One or more addresses separated by a comma
bcc One or more addresses separated by a comma
attachments The attachments
smtpHost The smtp host
Returns: true if the bulk email with the specified attachments is sent without issues, or false otherwise.
to A string containing 1 or multiple addresses separated by a comma.
from A string containing an address and optional reply addresses, separated by commas.
subject The subject of the bulk mail
msgText The message text
cc One or more addresses separated by a comma
bcc One or more addresses separated by a comma
attachments The attachments
overrideProperties An array of properties
Returns: true if the bulk mail was successfully sent, false otherwise.
to A string containing 1 or multiple addresses separated by a comma.
from A string containing an address and optional reply addresses, separated by commas.
subject The subject of the mail
msgText The message text
Returns: true if the email is sent successfully, false otherwise.
to A string containing 1 or multiple addresses separated by a comma.
from A string containing an address and optional reply addresses, separated by commas.
subject The subject of the mail
msgText The message text
cc One or more addresses separated by a comma
Returns: true if the email is sent, including to recipients in the “cc” field, or false in case of failure.
to A string containing 1 or multiple addresses separated by a comma.
from A string containing an address and optional reply addresses, separated by commas.
subject The subject of the mail
msgText The message text
cc One or more addresses separated by a comma
bcc One or more addresses separated by a comma
Returns: true if the email is sent successfully, covering both “cc” and “bcc” recipients, or false if an error occurs.
to A string containing 1 or multiple addresses separated by a comma.
from A string containing an address and optional reply addresses, separated by commas.
subject The subject of the mail
msgText The message text
cc One or more addresses separated by a comma
bcc One or more addresses separated by a comma
attachment A single attachment
Returns: true if the email containing the single specified attachment is sent successfully, or false otherwise.
to A string containing 1 or multiple addresses separated by a comma.
from A string containing an address and optional reply addresses, separated by commas.
subject The subject of the mail
msgText The message text
cc One or more addresses separated by a comma
bcc One or more addresses separated by a comma
attachment A single attachment
smtpHost The smtp host
Returns: true if the email containing the single specified attachment is sent successfully, or false otherwise.
to A string containing 1 or multiple addresses separated by a comma.
from A string containing an address and optional reply addresses, separated by commas.
subject The subject of the mail
msgText The message text
cc One or more addresses separated by a comma
bcc One or more addresses separated by a comma
attachment A single attachment
overrideProperties An array of properties
Returns: true if the email containing the single specified attachment is sent successfully, or false otherwise.
to A string containing 1 or multiple addresses separated by a comma.
from A string containing an address and optional reply addresses, separated by commas.
subject The subject of the mail
msgText The message text
cc One or more addresses separated by a comma
bcc One or more addresses separated by a comma
attachments The attachments
Returns: true if the email, along with the specified attachments, is sent successfully, or false otherwise.
to A string containing 1 or multiple addresses separated by a comma.
from A string containing an address and optional reply addresses, separated by commas.
subject The subject of the mail
msgText The message text
cc One or more addresses separated by a comma
bcc One or more addresses separated by a comma
attachments The attachments
smtpHost The smtp host
Returns: true if the email is dispatched with the specified attachments and overridden properties, or false if sending fails.
to A string containing 1 or multiple addresses separated by a comma.
from A string containing an address and optional reply addresses, separated by commas.
subject The subject of the mail
msgText The message text
cc One or more addresses separated by a comma
bcc One or more addresses separated by a comma
attachments The attachments
overrideProperties An array of properties
Returns: true if the email is dispatched with the specified attachments and overridden properties, or false if sending fails.