Skip to content

Commit

Permalink
Check for mailer implementation before calling setSender
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesDPC committed Oct 26, 2017
1 parent 8fdb6b2 commit bbe3015
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/extensions/UserFormsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function updateEmail(\UserFormRecipientEmail $email, \UserDefinedForm_Ema

// Set options on the Mailer
$mailer = $email::mailer();
if ($recipient->EmailFrom) {
if (($mailer instanceof MailgunSyncMailer) && $recipient->EmailFrom) {
$mailer->setSender($recipient->EmailFrom);// sets the 'Sender' header
}

Expand Down

0 comments on commit bbe3015

Please sign in to comment.