﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	focuses
49687	wp_mail() - Why is no envelope sender defined?	vbbp		"As just figured out, some (mail) servers require the envelope sender to be set in order to accept outgoing emails. 

For the PHP built-in mail() function (https://www.php.net/manual/en/function.mail.php) this can be done using the additional parameter (e.g. ""-fwebmaster@example.com) as explained in example 4 of the PHP manual page. 

In order to use that option and set the envelope sender in PHPmailer either the sender attribute of the phpmailer object needs to be set ($phpmailer->Sender = ""sender@example.com"") or when using the setFrom() method of PHPmailer, the 3rd parameter needs to be set to true (=default).

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). 

Is there any reason for doing so and could we change L358 to

$phpmailer->setFrom( $from_email, $from_name, true );

?"	defect (bug)	new	normal	Awaiting Review	Mail	5.4	minor		2nd-opinion has-patch dev-feedback		
