more debug

This commit is contained in:
2017-06-27 13:22:12 +10:00
parent 51d89c19c6
commit 0f2511205d

View File

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