[wp-trac] [WordPress Trac] #49687: wp_mail() - Why is no envelope sender defined?

WordPress Trac noreply at wordpress.org
Thu Mar 10 09:54:48 UTC 2022


#49687: wp_mail() - Why is no envelope sender defined?
----------------------------------------+------------------------------
 Reporter:  vbbp                        |       Owner:  (none)
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Mail                        |     Version:  5.4
 Severity:  minor                       |  Resolution:
 Keywords:  dev-feedback needs-testing  |     Focuses:
----------------------------------------+------------------------------

Comment (by kub1x):

 Replying to [comment:5 SergeyBiryukov]:
 > Hi there, welcome to WordPress Trac! Thanks for the report.
 >
 > Replying to [ticket:49687 vbbp]:
 > > Unfortunately, the current implementation of wp_mail() explicitly sets
 that 3rd parameter to false, which prevents the envelope sender from being
 set (see https://core.trac.wordpress.org/browser/trunk/src/wp-
 includes/pluggable.php?rev=47494#L358).
 >
 > Just noting that this was an intentional change in [38286] / #37736.

 Without the envelope sender being set (falling back to some default
 value), the requests are being rejected. Namely "sezman.cz" and "ovh.net"
 SMTP servers do reject those messages (log line below). Gmail won't look
 at the envelope sender and gladly accept the header from the message
 header.

 {{{
 Mar 10 10:36:52 localhost sm-mta[1763825]: 229JUjTK112345:
 to=<myemailaddress at seznam.cz>, ctladdr=<www-data at localhost.localdomain>
 (33/33), delay=14:06:07, xdelay=00:00:00, mailer=esmtp, pri=7770908,
 relay=mx2.seznam.cz., dsn=4.0.0, stat=Deferred: 451 4.4.8 Unroutable email
 address.
 }}}

 To me it causes just more harm. Only harm to be correct ;) Removing the
 false fixes everything in my case. But still have to go with coding it
 into plugin using the phpmailer_init action to keep the change
 permanent...

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49687#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list