1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Return-path modified when sending e-mails with the PHP mail() function
When sending an e-mail using the PHP mail() function, the RETURN-PATH is modified by the mail server (X-Authentication-Warning: imu00.infomaniak.com: httpd set sender to firstname.lastname@example.org using -f).
This change indicates that within the SMTP envelope the sender was forced to the address email@example.com.
This is done systematically across all sites hosted by us to avoid SPAM being sent from modified "From" fields.
Unfortunately, there is no way at all to change this. This is a protective measure designed to protect you from unsolicited e-mails being sent.
However, from within your code, the "Reply-To:" header allows the recipient to reply to you at the e-mail address given in the "Reply-To:" header even if webmaster@ is displayed in the "From:" field.
If there is a Return-Path in the header with an invalid domain name, the email is not sent by our server but the mail0 function will return a true value.