more debug
This commit is contained in:
@@ -15,6 +15,7 @@ class BookingMailSystem implements MailSystemInterface {
|
|||||||
*/
|
*/
|
||||||
public function format(array $message) {
|
public function format(array $message) {
|
||||||
$message['body'] = implode("\n\n", $message['body']);
|
$message['body'] = implode("\n\n", $message['body']);
|
||||||
|
watchdog('booking_debug', "<pre>BookingMailSystem format:\n@info</pre>", array('@info' => print_r( $message, true)));
|
||||||
return $message;
|
return $message;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,11 +33,13 @@ class BookingMailSystem implements MailSystemInterface {
|
|||||||
$mimeheaders[] = $name . ': ' . mime_header_encode($value);
|
$mimeheaders[] = $name . ': ' . mime_header_encode($value);
|
||||||
}
|
}
|
||||||
$line_endings = variable_get('mail_line_endings', MAIL_LINE_ENDINGS);
|
$line_endings = variable_get('mail_line_endings', MAIL_LINE_ENDINGS);
|
||||||
return mail(
|
$mail = mail(
|
||||||
$message['to'],
|
$message['to'],
|
||||||
mime_header_encode($message['subject']),
|
mime_header_encode($message['subject']),
|
||||||
preg_replace('@\r?\n@', $line_endings, $message['body']),
|
preg_replace('@\r?\n@', $line_endings, $message['body']),
|
||||||
join("\n", $mimeheaders)
|
join("\n", $mimeheaders)
|
||||||
);
|
);
|
||||||
|
watchdog('booking_debug', "<pre>BookingMailSystem mail:\n@info</pre>", array('@info' => print_r( $mail, true)));
|
||||||
|
return $mail;
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user