Migrate to t3lib_htmlmail to SwiftMailer
We have a new Mailer API in 4.5 based on SwiftMailer and we want to deprecate the use of t3lib_htmlmail. Which means we need to get rid of it all together.
Attached is an untested patch of what this would mean more or less for "linkvalidator". Please take a look at it, test it, and integrate that solution for the RC1 if possible.
See pending documentation at http://wiki.typo3.org/Pending_Documentation#t3lib_mail
Followup to bug #12344: Updated the manual for using the SwiftMailer
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/linkvalidator/trunk@42363 735d13b6-9817-0410-8766-e36946ffe9aa
#4 Updated by Chris topher almost 9 years ago
Looks good. I did some reformatting of the code and changed some texts.
If everything is OK, you can commit this one.
We will also have to update the manual. I will then take care of that after the commit.
#7 Updated by Ernesto Baschny almost 9 years ago
About this snippet(s):
$failure = t3lib_div::makeInstance( 'Exception', $GLOBALS['LANG']->sL('LLL:EXT:linkvalidator/locallang.xml:tasks.error.invalidFromEmail'), t3lib_FlashMessage::ERROR ); throw $failure; $sendEmail = FALSE;
1) throughout the core we usually use "throw new Exception()" syntax (no t3lib_div::makeInstance and no variable holding the exception before throwing it. Reasoning is that an exception should be thrown without relying on any other classes.
2) The second parameter of the Exception is not the FlashMessage Error-Code, but a unique unix timestamp (the time when you created the error message), so that we can differenciate different exceptions later on based on that information.
3) $sendEmail is never reached, so can also be removed (its shown as a "warning" in PhpStorm)
Could you adapt that still? Thanks!