[TYPO3-caretaker] Caretaker - Typo3 4.7 Mail Notification

Nina nina.pinkowski at scanlitho.de
Wed Jun 6 11:38:36 CEST 2012


 Hey,

 I run Caretaker with Typo3 4.7 and run in Problems with the Mail 
 Notification (notifications.simple_mail.enabled).
 Since Typo3 4.7 t3lib_htmlmail is removed. So I got PHP errors:
 PHP Fatal error: Class 't3lib_htmlmail' not found in 
 typo3conf/ext/caretaker/classes/services/notifications/class.tx_caretaker_SimpleMailNotificationService.php 
 on line 235

 So i replaced in the above mentioned file following:
 $mail = new t3lib_htmlmail();
 $mail->charset = 'utf-8';
 $mail->start();
 $mail->from_email = $from;
 $mail->returnPath = $from;
 $mail->subject = $subject;
 $mail->setPlain($mail->encodeMsg($message));

 return $mail->send($recipient);

 With:
 $mail = t3lib_div::makeInstance('t3lib_mail_Message');
 $mail->setFrom($from);
 $mail->setTo($recipient);
 $mail->setSubject($subject);
 $mail->setBody($message);
 
 return $mail->send();

 Now it runs fine.

 Greetings Nina


More information about the TYPO3-project-caretaker mailing list