Forum

Thread tagged as: Error, Hosting

Sending mail with gmail

Having a problem getting Perch mails to send via gmail. I put in the settings and try to send the test mail in the admin and it just hangs. I've also made sure that less secure apps are enabled.

[Sun Oct 16 18:49:50.595461 2016] [fcgid:warn] mod_fcgid: read data timeout in 60 seconds, referer: https://www.website.com/admin/core/settings/email/

If I remove the extra gmail settings from config then the test email sends fine.

Here's what I'm using:

define('PERCH_EMAIL_FROM', 'user@website.com');
define('PERCH_EMAIL_FROM_NAME', 'Stephen');
define('PERCH_EMAIL_METHOD', 'smtp');
define('PERCH_EMAIL_HOST', 'smtp.gmail.com');
define('PERCH_EMAIL_AUTH', true);
define('PERCH_EMAIL_SECURE', 'ssl');
define('PERCH_EMAIL_PORT', 465);
define('PERCH_EMAIL_USERNAME', 'user@website.com');
define('PERCH_EMAIL_PASSWORD', 'password');

They are the same settings I use in a separate Perch installation, on a different hosting plan, which works fine, so that's leading me to believe it could be an issue with the hosting (Fasthosts) environment?

Thanks for any help/advice.

Stephen Turvey

Stephen Turvey 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Sounds like it could be an issue relating to the hosting environment. It might be that your host is blocking the request or throttling it to somehow combat spam attacks.

In the first instance, you should ask them. They may well have a dedicated SMTP configuration for you to use.