From bbe30150bb7401c0c0b96f1f8721b09cb3da414e Mon Sep 17 00:00:00 2001 From: James Ellis Date: Thu, 26 Oct 2017 05:20:42 +0000 Subject: [PATCH] Check for mailer implementation before calling setSender --- src/extensions/UserFormsExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extensions/UserFormsExtension.php b/src/extensions/UserFormsExtension.php index 4e398df..0ab927d 100644 --- a/src/extensions/UserFormsExtension.php +++ b/src/extensions/UserFormsExtension.php @@ -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 }