Actions
Bug #94350
openImpossible to add Return-path to email in TYPO3 v. 10
Start date:
2021-06-15
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
The code below tries to add a bounce account as return path, but $senderEmail is used ad Return-Path in final mail header... - worked like a charm in TYPO3 v. 9
$subject = 'Test mail';
$bounceEmail = 'bounce@typoconsult.dk';
$senderName = 'TypoConsult';
$senderEmail = 'info@typoconsult.dk';
$fromAddress = new Address($senderEmail, $senderName);
$mail = GeneralUtility::makeInstance(MailMessage::class);
$mail->to(new Address('ch@typoconsult.dk'));
$mail->subject($subject);
$mail->returnPath(new Address($bounceEmail));
$mail->from($fromAddress);
$mail->replyTo($fromAddress);
$mail->sender($fromAddress);
$mail->html('This is a <b>test</b> mail...');
$mail->send();
Mail configuration is: /usr/sbin/sendmail -t -i
See attached image
Files
Actions