Index: t3lib/class.t3lib_formmail.php =================================================================== --- t3lib/class.t3lib_formmail.php (revision 10413) +++ t3lib/class.t3lib_formmail.php (working copy) @@ -233,14 +233,14 @@ $this->temporaryFiles[] = $theFile; } - $this->recipient = $valueList['recipient']; + $this->recipient = $this->parseAddresses($valueList['recipient']); $this->mailMessage->setSubject($this->subject) ->setFrom(array($this->fromAddress => $this->fromName)) ->setTo($this->recipient) ->setPriority($this->priority); $this->mailMessage->getHeaders()->addTextHeader('Organization', $this->organisation); if ($valueList['recipient_copy']) { - $this->mailMessage->addCc(trim($valueList['recipient_copy'])); + $this->mailMessage->addCc($this->parseAddresses($valueList['recipient_copy'])); } if ($this->characterSet) { $this->mailMessage->setCharset($this->characterSet); @@ -274,6 +274,34 @@ } /** + * Parses mailbox headers and turns them into an array. + * + * Mailbox headers are a comma separated list of 'name parseAddressList(); + $addressList = array(); + foreach ($addresses as $address) { + if ($address->personal) { + // item with name found ( name ) + $addressList[$address->mailbox . '@' . $address->host] = $address->personal; + } else { + // item without name found ( email@example.org ) + $addressList[] = $address->mailbox . '@' . $address->host; + } + } + return $addressList; + } + + /** * Sends the actual mail and handles autorespond message * * @return boolean