rsvp_mail

Definition

rsvp_mail($mailkey, $to, $subject, $body, $from = NULL, $headers = array())
rsvp/rsvp.module, line 1225

Description

A wrapper to drupal_mail, just to unify e-mails sent from RSVP module

Parameters

$mailkey A key to identify the mail sent, for altering.

$to The mail address or addresses where the message will be send to. The formatting of this string must comply with RFC 2822. Some examples are: 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. Drupal will format the correct line endings for you.

$from Sets From, Reply-To, Return-Path and Error-To to this value, if given.

$headers Associative array containing the headers to add. This is typically used to add extra headers (From, Cc, and Bcc). <em>When sending mail, the mail must contain a From header.</em>

Return value

Returns TRUE if the mail was successfully accepted for delivery, FALSE otherwise.

Related topics

Namesort iconDescription
functions for rsvp mailing.

Code

<?php
function rsvp_mail($mailkey, $to, $subject, $body, $from = NULL, $headers = array()) {
  $site_name = variable_get('site_name', 'drupal');
  $headers = array_merge(
    $headers, array(
      'Content-Type' => 'text/html; charset=UTF-8; format=flowed',
    )
  );
  return drupal_mail($mailkey, $to, $subject, $body, $from, $headers);
}
?>