WWW.GAMEREACTION.NL

"Momentum, a function of mass and velocity, is conserved between portals. In layman's terms, speedy thing goes in, speedy thing comes out." -  
You are here: gamereaction.nl  > Blog  > HTML mail from TYPO3 

HTML mail from TYPO3

posted on 31 August 2009 in TYPO3

I have been sending a lot of HTML mail out of TYPO3 lately so thought I would paste the script here for future reference and use of anyone else wishing to use the script.

    $Typo3_htmlmail = t3lib_div::makeInstance('t3lib_htmlmail');
    $Typo3_htmlmail->start();
    $Typo3_htmlmail->subject = 'Subject';
    $Typo3_htmlmail->from_email = 'email@from.com';
    $Typo3_htmlmail->returnPath = 'email@return.com';
    $Typo3_htmlmail->from_name = 'sender';
    $userMail = 'CONTENTS';
    $userMail = '<html><head></head><body>'.$userMail.'</body></html>';
    $Typo3_htmlmail->setRecipient(email@recipient.com);
    $Typo3_htmlmail->setHTML($Typo3_htmlmail->encodeMsg($userMail));
    $Typo3_htmlmail->addPlain(strip_tags($userMail, "<a>"));
    $Typo3_htmlmail->send('');

No comments have been posted





are you human?

this site was made by gamereaction
powered by TYPO3
RSS Feed