Bug #14273
closedreturn-path isn't set correctly by t3lib_htmlmail
0%
Description
Setting the return-path in the header of an email seems not to work on most installations. In fact I haven't seen any TYPO3 installation sending a correct return-path at all.
You'll probably have to trick around with some environment settings (like sendmail_from, sendmail_path) to get it working.
Just try a mail form or a send a direct mail.
There are some hints about the return-path issue at www.php.net/manual/en/function.mail
(issue imported from #M292)
Files
Updated by Ingmar Schlecht over 20 years ago
assigning to Erik, our t3lib_htmlmail maintainer.
Updated by Simon Ihmig about 20 years ago
See the attached file for a replacement of t3lib_htmlmail->sendTheMail
Works for me (TYPO3 3.6.1 & Postfix), would be nice to have this integrated in the next release!
Updated by Jan-Erik Revsbech about 20 years ago
The bug is now fiex in the 3.6.0 branch (for the upcoming relase of 3.6.3) and also in the head for the 3.7.0 release.
Thanks to Ihmig for an idea for the soultion, and sorry for the long wait.
There is two different solutions, one for windows which utilize the php.ini parameter sendmail_from (which is now set by ini_set). This solution works even if running in safe_mode.
for the linux/unix solution I used the idea from Ihmig, passing f$this>returnPath as a parameter to the MTA. This however is not allowed in safe_mode, som a check has been introduced to prevent error when running in safe_mode. The bug is still unsolved for systems running in safe mode. Ideas anyone? The fix should work for most MTA. At least sendmail, postfix and qmail.
/Jan-Erik
Updated by Thorsten Kahler almost 20 years ago
This patch doesn't work with Postfix prior to version 2.1.
The PHP mail() function seems to be buggy and causes problems with a fifth parameter "additional_parameters" set to "". Postfix reports
postfix/sendmail12345: fatal: cannot handle command-line recipients with -t
Sending a test mail from the install tool did work, also setting the returnPath hard coded in t3lib_htmlmail (there's yet no possbility to set the returnPath for a form mail!). The fixes made for this consecutive bug in revision 1.11 (2005-01-21) seem to cause much overhead.
I suggest to simply test if the returnPath is set like:
if(!ini_get('safe_mode') && $returnPath) {
instead of:
if(!ini_get('safe_mode') && !$this->postfix_version1) {
This works fine with Postfix version 1.1.12 on Linux.
edited on: 21.02.05 14:47
Updated by Michael Stucki over 19 years ago
Has been solved in CVS for 3.7.1 and all later versions by Jan-Erik.