EmailSender.sendEmail

Spawns a child process that sends an email using sendmail.

If multiple entries need to be passed in the recipient list, cc list, or bcc list, then the entries need to be comma separated. There exists an overloaded version of this function which takes these lists as 2D arrays instead of regular arrays (with each entry being passed in a different index), and automatically performs the comma separation.

  1. bool sendEmail(cstring sender, cstring[] recipients, cstring subject, cstring msg_body, cstring reply_to, cstring mail_id, cstring[] cc, cstring[] bcc)
  2. bool sendEmail(cstring sender, cstring recipients, cstring subject, cstring msg_body, cstring reply_to, cstring mail_id, cstring cc, cstring bcc)
    class EmailSender

Parameters

sender cstring

the sender of the email

recipients cstring

the recipient(s) of the email, multiple entries need to be comma separated

subject cstring

the email subject

msg_body cstring

the email body

reply_to cstring

an optional Reply To. default empty

mail_id cstring

an optional mail id/In-Reply-To. default empty

cc cstring

an optional cc, multiple entries need to be comma separated (defaults to null)

bcc cstring

an optional bcc, multiple entries need to be comma separated (defaults to null)

Return Value

Type: bool

true if the mail was sent without any errors, otherwise false

Meta