warning: mail() has been disabled for security reasons in /home/.../includes/common.inc on line 1991.
in file common.inc online 1935 - 1993
function drupal_mail($mailkey, $to, $subject, $body, $from = NULL, $headers = array()) {
$defaults = array(
'MIME-Version' => '1.0',
'Content-Type' => 'text/plain; charset=UTF-8; format=flowed',
'Content-Transfer-Encoding' => '8Bit',
'X-Mailer' => 'Drupal'
);
// To prevent e-mail from looking like spam, the addresses in the Sender and
// Return-Path headers should have a domain authorized to use the originating
// SMTP server. Errors-To is redundant, but shouldn't hurt.
$default_from = variable_get('site_mail', ini_get('sendmail_from'));
if ($default_from) {
$defaults['From'] = $defaults['Reply-To'] = $defaults['Sender'] = $defaults['Return-Path'] = $defaults['Errors-To'] = $default_from;
}
if ($from) {
$defaults['From'] = $defaults['Reply-To'] = $from;
}
$headers = array_merge($defaults, $headers);
// Custom hook traversal to allow pass by reference
foreach (module_implements('mail_alter') AS $module) {
$function = $module .'_mail_alter';
$function($mailkey, $to, $subject, $body, $from, $headers);
}
// Allow for custom mail backend
if (variable_get('smtp_library', '') && file_exists(variable_get('smtp_library', ''))) {