Bug #25301
Setting "Reply-To" fails in class.t3lib_formmail.php
| Status: | Resolved | Start date: | 2011-03-10 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | Jigal van Hemert | % Done: | 100% |
|
| Category: | - | |||
| Target version: | - | |||
| TYPO3 Version: | 4.5 | Complexity: | ||
| PHP Version: | 5.2 | |||
| Votes: | 0 |
Description
t3lib_formmail tries to set a "Reply-To:" Header but fails doing so because of a wrong call of method "addReplyTo()" from swiftmailer.
The method "addReplyTo()" of class "t3lib_mail_Message" (which extends Swift_Message) expects to parameters of "string" type.
But t3lib_formmail sets an array as argument to "addReplyTo()".
Original Code (line 232...):
$replyTo = $this->replyToName ? array($this->replyToAddress => $this->replyToName) : array($this->replyToAddress);
$this->mailMessage->addReplyTo($replyTo);
This can be fixed by using this line instead:
$this->mailMessage->addReplyTo($this->replyToAddress, $this->replyToName);
(issue imported from #M17916)
Related issues
| duplicated by Core - Bug #25415: t3lib_formmail: addReplyTo method of Swift Mailer SimpleM... | Resolved | 2011-03-29 |
Associated revisions
[BUGFIX] Use setReplyTo and setCc instead of add*
The methods addReplyTo and addCc accept strings as parameters, but we
need the setReplyTo and setCc which accept arrays. This will make the
reply-to and recipient-copy options work in formMail.
Change-Id: Ia3826d51f53ffe497f4c3b25957f0332fb89e81e
Resolves: #25301
Releases: 4.6
Reviewed-on: http://review.typo3.org/1442
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
History
Updated by Jigal van Hemert over 2 years ago
Easiest solution was to use setReplyTo() and setCc(), which take the current array format.
Review at https://review.typo3.org/1129
Updated by Susanne Moog about 2 years ago
- Target version deleted (
4.5.3)
Updated by Mr. Hudson about 2 years ago
Patch set 3 of change Ia3826d51f53ffe497f4c3b25957f0332fb89e81e has been pushed to the review server.
It is available at http://review.typo3.org/1442
Updated by Mr. Hudson about 2 years ago
Patch set 4 of change Ia3826d51f53ffe497f4c3b25957f0332fb89e81e has been pushed to the review server.
It is available at http://review.typo3.org/1442
Updated by Jigal van Hemert about 2 years ago
- Status changed from Accepted to Resolved
- % Done changed from 0 to 100
Applied in changeset 515d8b3122507df2c8e1e6b365e89f46a02e6633.