[TYPO3-dev] swiftmailer and html

Thomas Mammitzsch thomas at visualworx.de
Tue Dec 13 14:12:16 CET 2011


Hi list,

i try to send an hmtl email with swiftmailer. The html part only has 
some text with <br /> tags. Unfortunately the mail doesn't display the 
breaks but the tags. My code looks like that:

$mail = t3lib_div::makeInstance('t3lib_mail_Message');
$mail->setFrom(somesender at tld.com)
   ->setTo(somerecipient at tld.com)
   ->setSubject($subject)
   ->setBody($body, 'text/html')
   ->addPart(strip_tags($body), 'text/plain')
   ->send();


SubstituteOldMailApi is set to 1 in the config.
Would be great if someone can give me a hint.



More information about the TYPO3-dev mailing list