Project

General

Profile

Actions

Bug #94350

open

Impossible to add Return-path to email in TYPO3 v. 10

Added by Claus Harup over 3 years ago. Updated over 1 year ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
-
Target version:
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

sreen.png (42.5 KB) sreen.png Claus Harup, 2021-06-15 15:22
Actions

Also available in: Atom PDF