Katie Horn has submitted this change and it was merged.
Change subject: Stop PhpMailer Errors in Production
......................................................................
Stop PhpMailer Errors in Production
PhpMailer was complaining it didn't have a message body because
I was filling in the wrong field.
Change-Id: Id806e433ce09169d5fa8476d4eedce6d4c54e074
---
M SmashPig/Core/MailHandler.php
1 file changed, 5 insertions(+), 3 deletions(-)
Approvals:
Katie Horn: Verified; Looks good to me, approved
diff --git a/SmashPig/Core/MailHandler.php b/SmashPig/Core/MailHandler.php
index 9de6757..0cf5e7f 100644
--- a/SmashPig/Core/MailHandler.php
+++ b/SmashPig/Core/MailHandler.php
@@ -99,9 +99,6 @@
}
);
- $mailer->Subject = $subject;
- $mailer->AltBody = $textBody;
-
array_walk(
$attach,
function ( $value, $key ) use ( $mailer ) {
@@ -124,8 +121,13 @@
$mailer->AddReplyTo( $replyTo );
}
+ // Set subject and body
+ $mailer->Subject = $subject;
if ( $htmlBody ) {
$mailer->MsgHTML( $htmlBody );
+ $mailer->AltBody = $textBody;
+ } else {
+ $mailer->Body = $textBody;
}
// We replace $1 in email/bounce-address or useVerp if
string to create the bounce addr
--
To view, visit https://gerrit.wikimedia.org/r/67315
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id806e433ce09169d5fa8476d4eedce6d4c54e074
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/PaymentsListeners
Gerrit-Branch: master
Gerrit-Owner: Mwalker <[email protected]>
Gerrit-Reviewer: Katie Horn <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits