Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Gmail email doesn't work by default

#330

In config.php I have:

define("SMTP_SERVER",'smtp.gmail.com');
define("SMTP_PORT",'465');
define("SMTP_AUTHTYPE",'LOGIN');
define("SMTP_USERNAME",'myemail@gmail.com');
define("SMTP_PASSWORD",'******');

It does not work, debugging lead me to the solution, in framework/core/subsystems/expMail.php line 142 replace:

$this->transport = Swift_SmtpTransport::newInstance(SMTP_SERVER, SMTP_PORT)

with:

$this->transport = Swift_SmtpTransport::newInstance(SMTP_SERVER, SMTP_PORT, "ssl")

It appears with the move to Swift-4, the SMTP_AUTHTYPE constant is unused. This is why it doesn't work by default.

Reported by Imran · September 8th, 2011 @ 08:23 PM

State: resolved
Milestone: 2.0.1
Assigned to: dleffler dleffler

Activity

  1. expNinja
    expNinja
    • State changed from open to resolved

    (from [685ff4e04073af7c35243574b00855f0f30e7786]) Adds encryption protocol to expMail allowing connection to SMTP servers using SSL or TLS encryption in addition to 'None' which previously was the method used. The 'Authentication Type' setting/option was removed since it isn't/wasn't used. Swift uses authentication based on the username being filled in.[#330 Gmail email doesn't work by default state:resolved milestone:2.0.1] https://github.com/exponentcms/exponent-cms/commit/685ff4e04073af7c...

    September 9th, 2011 @ 12:46 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.