From 0f2511205d1ecf2153b41bae939e0847e7a882cf Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Tue, 27 Jun 2017 13:22:12 +1000 Subject: [PATCH] more debug --- booking.MailSystemInterface.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booking.MailSystemInterface.inc b/booking.MailSystemInterface.inc index 5c47cf9..3a47793 100644 --- a/booking.MailSystemInterface.inc +++ b/booking.MailSystemInterface.inc @@ -15,6 +15,7 @@ class BookingMailSystem implements MailSystemInterface { */ public function format(array $message) { $message['body'] = implode("\n\n", $message['body']); + watchdog('booking_debug', "
BookingMailSystem format:\n@info
", 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', "
BookingMailSystem mail:\n@info
", array('@info' => print_r( $mail, true))); + return $mail; } } \ No newline at end of file