Project

General

Profile

Actions

Feature #12344

closed

Migrate to t3lib_htmlmail to SwiftMailer

Added by Ernesto Baschny about 13 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Category:
Linkvalidator
Target version:
-
Start date:
2011-01-18
Due date:
2011-01-19
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

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

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #12261: Reports are not sending correct emailsClosed2011-01-15

Actions
Is duplicate of TYPO3 Core - Feature #11276: Use the new mail API for the scheduler mailClosed2010-12-03

Actions
Actions #1

Updated by Michael Miousse about 13 years ago

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.

Actions #2

Updated by Michael Miousse about 13 years ago

  • Status changed from Needs Feedback to Closed
Actions #3

Updated by Michael Miousse about 13 years ago

  • Status changed from Closed to Needs Feedback

sorry i thoutgh it would only close 11276

Actions #4

Updated by Chris topher about 13 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.

Actions #5

Updated by Michael Miousse about 13 years ago

  • Status changed from Needs Feedback to Resolved

Committed revision 42362.

Actions #6

Updated by Chris topher about 13 years ago

  • Assignee set to Michael Miousse
  • % Done changed from 0 to 100

I updated the manual.

Committed in r42363.

Actions #7

Updated by Ernesto Baschny about 13 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!

Actions #8

Updated by Michael Miousse about 13 years ago

Will do

Actions #10

Updated by Chris topher about 13 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.

Actions #11

Updated by Michael Miousse about 13 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?

Actions #12

Updated by Chris topher about 13 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).

Actions #14

Updated by Michael Miousse about 13 years ago

Michael Miousse wrote:

okay here it is

sorry i forgot to erase path from the patch

Actions #16

Updated by Michael Miousse about 13 years ago

Committed revision 42365.

Actions #17

Updated by Chris topher about 12 years ago

  • Status changed from Resolved to Closed
Actions #18

Updated by Michael Stucki over 10 years ago

  • Category set to Linkvalidator
Actions #19

Updated by Michael Stucki over 10 years ago

  • Project changed from 1510 to TYPO3 Core
  • Category changed from Linkvalidator to Linkvalidator
Actions

Also available in: Atom PDF