[wp-trac] [WordPress Trac] #49687: wp_mail() - Why is no envelope sender defined?
WordPress Trac
noreply at wordpress.org
Thu Sep 3 11:29:45 UTC 2020
#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 lordandy1984):
Not sure why this was added, because both options might cause issues on
some environments (although I would stick with the PhpMailer default).
So the only solution is to use the `phpmailer-init` action in a small
plugin?
{{{#!php
<?php
add_action( 'phpmailer_init', 'xyz_add_phpmailer_setfrom' );
function xyz_add_phpmailer_setfrom( $phpmailer ) {
$phpmailer->setFrom(
'mysender at example.com',
'My Sender' // From name.
);
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49687#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list