Feature #12344
closedMigrate to t3lib_htmlmail to SwiftMailer
Added by Ernesto Baschny almost 14 years ago. Updated almost 11 years ago.
100%
Description
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
Thanks!
Files
linkvalidator-swiftmailer.diff (1.98 KB) linkvalidator-swiftmailer.diff | Ernesto Baschny, 2011-01-18 09:09 | ||
linkvalidator-swiftmailer_v2.diff (5.75 KB) linkvalidator-swiftmailer_v2.diff | Michael Miousse, 2011-01-19 16:30 | ||
linkvalidator-swiftmailer_v3.diff (5.68 KB) linkvalidator-swiftmailer_v3.diff | Chris topher, 2011-01-19 21:00 | ||
linkvalidator-swiftmailer_v4.diff (2 KB) linkvalidator-swiftmailer_v4.diff | Michael Miousse, 2011-01-19 22:05 | ||
linkvalidator-swiftmailer_v5.diff (2.01 KB) linkvalidator-swiftmailer_v5.diff | Michael Miousse, 2011-01-19 22:42 | ||
linkvalidator-swiftmailer_v6.diff (1.91 KB) linkvalidator-swiftmailer_v6.diff | Michael Miousse, 2011-01-19 22:51 |
Updated by Michael Miousse almost 14 years ago
- File linkvalidator-swiftmailer_v2.diff linkvalidator-swiftmailer_v2.diff added
- Status changed from New to Needs Feedback
Here is a tested version 2 of the patch with validations and error messages.
Need someone to double check the messages and double test it.
Updated by Michael Miousse almost 14 years ago
- Status changed from Needs Feedback to Closed
Updated by Michael Miousse almost 14 years ago
- Status changed from Closed to Needs Feedback
sorry i thoutgh it would only close 11276
Updated by Chris topher almost 14 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.
Updated by Michael Miousse almost 14 years ago
- Status changed from Needs Feedback to Resolved
Committed revision 42362.
Updated by Chris topher almost 14 years ago
- Assignee set to Michael Miousse
- % Done changed from 0 to 100
I updated the manual.
Committed in r42363.
Updated by Ernesto Baschny almost 14 years ago
Nice work!
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!
Updated by Michael Miousse almost 14 years ago
Like this?
Updated by Chris topher almost 14 years ago
The timestamp should be the time from now. Just as a hardcoded string like: 1295471588
But use 3 different timestamps for the 3 different messages.
Updated by Michael Miousse almost 14 years ago
Christopher wrote:
The timestamp should be the time from now. Just as a hardcoded string like: 1295471588
But use 3 different timestamps for the 3 different messages.
time() is not good?
Updated by Chris topher almost 14 years ago
Michael Miousse wrote:
time() is not good?
No, because the timestamp should be used to identify each error message. Therefore it must always be the same for the same message (but different for every other message).
Updated by Michael Miousse almost 14 years ago
okay here it is
Updated by Michael Miousse almost 14 years ago
Michael Miousse wrote:
okay here it is
sorry i forgot to erase path from the patch
Updated by Michael Miousse almost 14 years ago
Updated by Chris topher over 12 years ago
- Status changed from Resolved to Closed
Updated by Michael Stucki almost 11 years ago
- Project changed from 1510 to TYPO3 Core
- Category changed from Linkvalidator to Linkvalidator