You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

mail_send()

Usage

mail_send()

Description

Sends the currently configured mail and returns the message-id of the created mail.

Note

  • Will result in an error if no To:, Cc: or Bcc: addresses are configured.
  • Will result in an error if mail_begin() was not called

Example

${mail_send()}

Search results for "mail_send()"

mail_send()

Sends the currently configured mail and returns the message-id of the created mail.
If not all pre-conditions are met or the sending of the mail fails, an empty string will be returned and an error message is logged.

Since v3.6 the error message can be retrieved via mail_get_error() and the presence of an error can be checked via mail_has_error(). Before attempting to send the mail, the last error (if any) is cleared automatically.

mail_send()