wallabag: Sending emails using Gmail fails with error: Connection could not be established with host smtp.gmail.com [Operation timed out #110] [] []

Issue details

I have configured Gmail smtp settings in app/config/parameters.yml:

...
    mailer_transport: gmail
    mailer_host: smtp.gmail.com:587
    mailer_user: <gmail-user-account>
    mailer_password: <gmail-app-passwd>
...

However I don’t receive any email from wallabag, e.g. for 2-Factor-Authentication.

In the logfile var/logs/prod.log I find this relevant entry:

[2018-10-17 13:18:40] app.ERROR: Exception occurred while flushing email queue: Connection could not be established with host smtp.gmail.com [Operation timed out #110] [] []

To start troubleshooting this issue I have verified if the Gmail account is working, mean I installed SSMTP on the same server and sent an email with this simple command: ssmtp <user@example.com> < /tmp/mail.txt

This worked w/o issues and confirmed the correct Gmail user name and password.

Environment

  • wallabag version (or git revision) that exhibits the issue: latest git
  • How did you install wallabag? Via git clone or by downloading the package? git
  • php version: 7.2.11
  • OS: Alpine Linux 3.8
  • type of hosting (shared or dedicated): dedicated
  • which storage system you choose at install (SQLite, MySQL/MariaDB or PostgreSQL): MariaDB

Steps to reproduce/test case

  1. Activate 2-Factor-Authentication for user account
  2. Try to login with this user account

Question: How can I validate if wallabag can send emails with the used configuration? Is there a CLI command for sending emails?

THX

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19 (10 by maintainers)

Most upvoted comments

There’s an easier way of checking connectivity to a given port:

nc -vz -w1 {host} {port}

In our case: nc -vz -w1 smtp.gmail.com 587

As a side note, port 465 is for SMTP over SSL and port 587 is for SMTP with STARTTLS.

I don’t like the way you handle this issue. With wallabag you’re using some functionality from Swiftmail for sending emails. Your statement is that this is not related to wallabag, however it is. I mean if you use a functionality that is not working, than you should either collaborate with the provider of this functionality to fix it or replace it with something that is working.

Therefore I consider that this issue cannot be closed.