[TYPO3-v4] Bringing all the mail functions together...

Ernesto Baschny [cron IT] ernst at cron-it.de
Sat Nov 27 11:46:00 CET 2010


Jigal van Hemert schrieb am 26.11.2010 22:20:
> Hi,
> 
> In 4.5 the Swift Mailer package is introduced and available from the
> t3lib_mail_mailer and t3lib_mail_message classes. This offers the
> possibility to send mail using SMTP, mail() function, etc. depending on
> the configuration.
> 
> We could change all the places which use t3lib_utility_Mail (a lot of
> work to change things again) or provide a hook subscriber for
> t3lib_utility_Mail::mail() which passes the sending of the mail to Swift
> Mailer. This way TYPO3 can send all mails using for example SMTP if the
> installation is configured to do so.
> 
> If the RMs feel that this hook subscriber should go in 4.5 I'll prepare
> a patch.

Hi Jigal,

that's on my "radar" still, but had no time to do so. That would be
*awesome*.

The only trouble is that the headers and body are already "created" when
passed to t3lib_utility_Mail::mail(), so one will have to just make use
of the SwiftMailer configured Transport and by-pass the while
"t3lib_mail_Message" part.

Since a Transport requires a "Swift_Mime_Message", you basically will
need a class that implements "Swift_Mime_Message" but takes the
information which the caller passed to mail() instead (this means
parsing the headers from the $to, $subject and $additionalHeaders).

Would you find time to work on that?

Cheers,
Ernesto


More information about the TYPO3-project-v4 mailing list