Skip to content

Commit 5459db2

Browse files
committed
Fix SMTP sender verification after WordPress changes
WordPress changeset 61010 removed the third parameter (false) from setFrom() in wp_mail(), which now causes the Sender header to be automatically set. This can cause sender verification failures with some SMTP servers. This fix explicitly sets Sender property to match From address. Fixes #15
1 parent cb82ac0 commit 5459db2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/AcornMail.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ protected function configureMail(): void
6464
$this->fromAddress(),
6565
$this->fromName()
6666
);
67+
68+
$mail->Sender = $mail->From;
6769
});
6870
}
6971

0 commit comments

Comments
 (0)