Elxis CMS Forum

Extensions => Tools => Topic started by: dnglaze on May 25, 2008, 10:54:24

Title: Swift Mailer Integration with Elxis
Post by: dnglaze on May 25, 2008, 10:54:24
I was contemplating working the Swift Mailer into Elxis (http://www.swiftmailer.org/ (http://www.swiftmailer.org/)).  The main reason is that I would like to have support for TLS encryption so I can use Google's servers to do the mailing.  My other thought was that others may be able to make use of Swift's many features to add more functionality to the mailing system should they choose to do so.  All together it would be a major step up from the PHPMailer.

One of the issues I did discover in doing this is that Elxis is not built to have the mailer overridden.  In essence, the mosPHPMailer class is set in stone for now.  I was thinking that if this was replaced and instead a configuration option was used, it may be fairly easy to do the mail overrides.  One could just implement a class that handled all the necessary methods for mailing that the core Elxis files used.  This means that there should only need to be a few lines modified.  One to add the mailer config option and more to select between the default PHPMailer and some other mailer.  Altogether, nothing huge for the Elxis core.

Another problem (maybe) is that Swift Mailer will be going PHP5 and will not be releasing anymore updates to the mailer that are PHP4 compliant.  I noticed that Elxis maintains PHP4 compatibility code.  If this remains the stance for the main developers, it would mean that the Swift Mailer has to stay as an external component of Elxis.

One other note I wanted to make is that if Elxis wanted to start moving towards PHP5, a mailer interface class could be created to be sure any new mailer some one made had the correct methods.  Let me know what you all think of this and if you have any suggestions about implementing a non-default mailer.  Thanks in advance.
Title: Re: Swift Mailer Integration with Elxis
Post by: datahell on May 25, 2008, 13:46:54
We are currently very busy developing Elxis 2008.1 and I don't have time to check the swiftmailer features right now. BUT if you think it will be a good alternative solution for the phpmailer we can implement it in Elxis core. I don't like the idea of adding one more global configuration variable. We try to keep them as less as possible and there will be compatibility problems with previous elxis versions.

Solutions/Information:
1. In Elxis 2008.0 we introduced SoftDisk which is a virtual memory that you can store any parameters you wish. So, instead of adding a global configuration parameter add a new softdisk entry!

2. We have already moved to PHP5 and Elxis 2008.1 is compatible only with PHP5. All new extensions at Elxis Downloads Center are compatible only with PHP 5 too.

3. Do your modifications in Elxis core in order to implement swiftmailer and when finish send them to me (datahell elxis org) or to Ivan Trebjesanin (jazzman elxis org) to check them and implement them in Elxis 2008.1 main release.