You are here

interface MailSystemInterface in Mail System 6

Same name and namespace in other branches
  1. 6.2 mailsystem.module \MailSystemInterface

An interface for pluggable mail back-ends.

Hierarchy

Expanded class hierarchy of MailSystemInterface

All classes that implement MailSystemInterface

2 string references to 'MailSystemInterface'
drupal_mail_system in ./mailsystem.module
Returns an object that implements the MailSystemInterface.
mailsystem_get_classes in ./mailsystem.admin.inc
Returns a list of classes which implement MailSystemInterface.

File

./mailsystem.module, line 253
Provide UI for controlling the mail_system variable.

View source
interface MailSystemInterface {

  /**
   * Format a message composed by drupal_mail() prior sending.
   *
   * @param $message
   *   A message array, as described in hook_mail_alter().
   *
   * @return
   *   The formatted $message.
   */
  public function format(array $message);

  /**
   * Send a message composed by drupal_mail().
   *
   * @param $message
   *   Message array with at least the following elements:
   *   - id: A unique identifier of the e-mail type. Examples: 'contact_user_copy',
   *     'user_password_reset'.
   *   - to: The mail address or addresses where the message will be sent to.
   *     The formatting of this string must comply with RFC 2822. Some examples:
   *     - user@example.com
   *     - user@example.com, anotheruser@example.com
   *     - User <user@example.com>
   *     - User <user@example.com>, Another User <anotheruser@example.com>
   *    - subject: Subject of the e-mail to be sent. This must not contain any
   *      newline characters, or the mail may not be sent properly.
   *    - body: Message to be sent. Accepts both CRLF and LF line-endings.
   *      E-mail bodies must be wrapped. You can use drupal_wrap_mail() for
   *      smart plain text wrapping.
   *    - headers: Associative array containing all additional mail headers not
   *      defined by one of the other parameters.  PHP's mail() looks for Cc
   *      and Bcc headers and sends the mail to addresses in these headers too.
   *
   * @return
   *   TRUE if the mail was successfully accepted for delivery, otherwise FALSE.
   */
  public function mail(array $message);

}

Members

Namesort descending Modifiers Type Description Overrides
MailSystemInterface::format public function Format a message composed by drupal_mail() prior sending. 1
MailSystemInterface::mail public function Send a message composed by drupal_mail(). 1