[Frage] Extbase Mailversand Typo3 6.x


  • 1
  • Velletti Velletti
    R2-D2
    0 x
    83 Beiträge
    3 Hilfreiche Beiträge
    06. 02. 2014, 13:38

    ich so :

    1. public function sendMail($recipient, $subject, $message, $htmlMessage, $senderEMail, $senderName = '', $replyToEMail = '', $replyToName = '', $returnPath = 'info@firma.de', $organization = 'Firma GmbH') {
    2.  
    3. $replyToEMail2 = $replyToEMail != '' ? $replyToEMail : $senderEMail;
    4. $replyToName2 = $replyToName != '' ? $replyToName : $senderName;
    5. $plainmessage = strip_tags($message );
    6.  
    7. $Typo3_v6mail = t3lib_div::makeInstance('t3lib_mail_Message');
    8. $Typo3_v6mail->setTo($recipient);
    9. $Typo3_v6mail->setReplyto(array($replyToEMail2 => $replyToName2));
    10.  
    11. $Typo3_v6mail->setSubject($subject);
    12. $Typo3_v6mail->setFrom(array($senderEMail => $senderName));
    13. $Typo3_v6mail->setReturnPath($returnPath);
    14. $Typo3_v6mail->setPriority("3");
    15.  
    16. $Typo3_v6mail->setBody($htmlMessage, 'text/html');
    17. $Typo3_v6mail->addPart($plainmessage, 'text/plain');
    18.  
    19. if (t3lib_div::validEmail($recipient)) {
    20. $Typo3_v6mail->send();
    21. }
    22.  
    23.  
    24. }

    Grüße Jörg

    Typo3 seit 2010. Multilinguale (> 8 ) , Multi-Domain Installation aktuell unter 4.5.x LTS:
    Main used Extension: DAM, REAL URL, Powermail, tt_address, tt_news, cal, MM_forum (fork), Community (fork), Diversen eigenen extbase/Fluid extension

  • 1