[BUGFIX] Use setReplyTo and setCc instead of add*
authorJigal van Hemert <jigal@xs4all.nl>
Thu, 10 Mar 2011 21:25:14 +0000 (22:25 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 25 Apr 2011 21:43:48 +0000 (23:43 +0200)
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
t3lib/class.t3lib_formmail.php

index 0394680..f3acbbb 100644 (file)
@@ -228,10 +228,10 @@ class t3lib_formmail {
                                        ->setTo($this->recipient)
                                        ->setPriority($this->priority);
                        $replyTo = $this->replyToName ? array($this->replyToAddress => $this->replyToName) : array($this->replyToAddress);
-                       $this->mailMessage->addReplyTo($replyTo);
+                       $this->mailMessage->setReplyTo($replyTo);
                        $this->mailMessage->getHeaders()->addTextHeader('Organization', $this->organisation);
                        if ($valueList['recipient_copy']) {
-                               $this->mailMessage->addCc($this->parseAddresses($valueList['recipient_copy']));
+                               $this->mailMessage->setCc($this->parseAddresses($valueList['recipient_copy']));
                        }
                        if ($this->characterSet) {
                                $this->mailMessage->setCharset($this->characterSet);