Do we have modern auth SMTP supported in OJS 3.5

Hi @deepakc,

I’m afraid the long answer is going to require a bit of a detour through OJS history…

OJS 3.3 and older used PHPMailer directly to deliver email. OJS 3.4 and newer (including 3.5) uses Symfony mailer instead (in line with our increasing adoption of Laravel, which also uses Symfony mailer).

Symfony mailer includes support for a number of different authorization methods and transports. Configuration for these is passed in from the config.inc.php configuration file in the PKP Container’s initialization – this is where OJS configuration is adapted to Laravel-style configuration (including for the mailer).

As you can see from that snippet of code, the transport configured there is still PHPMailer [edit: only with default = phpmailer in config.inc.php]! This is implemented in the PHPMailerTransport class, which maps the Laravel configuration into what PHPMailer expects. The reason for allowing this pathway is explained in #7285. In short, the usual Symfony transport requires the use of PHP proc_… functions, which are often disabled on commodity hosts. To avoid putting OJS users in conflict with their ISPs, we continued to support PHPMailer when needed.

Laravel’s mail system, and Symfony mailer and PHPMailer underneath it, all support a wide variety of auth options, including OAuth. But the configuration is transformed from OJS’s config.inc.php file, to Laravel-style configuration, then potentially to PHPMailer-style configuration, and not all configuration options are carried through.

If the configuration options that you require aren’t passed through in the configuration conversions from config.inc.php, let me know which additional options you need, and I may be able to get them added.

Related posts:

Regards,
Alec Smecher
Public Knowledge Project Team

2 Likes