question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mailgun mail returns Error: connect ETIMEDOUT 52.0.63.157:587

See original GitHub issue

Configured Mailgun with the following in config.json:

mail: {
    transport: 'SMTP',
    options: {
        service: 'Mailgun',
            auth: {
                user: 'postmaster@mailgun.mydomain.com',
                pass: process.env.MAILGUN_PASSWORD
            }
        }
},

When I try to send an e-mail (e.g. forgot password or test in admin), the request 500 errors with:

{"errors":[{"message":"Error: connect ETIMEDOUT 52.0.63.157:587","errorType":"EmailError"}]}

Doing a whois on 52.0.63.157 returns this is an AWS ip address. Quite strange.

  • Ghost Version: 0.11.4
  • Node Version: 6.9.4
  • Browser/OS: Ubuntu 16.04 LTS
  • Database: sqlite3

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
mgilbircommented, Feb 16, 2017

As I ended up here with the same problem and for the sake of documentation, I got help on the slack channel and it turned out to be that my host is blocking the default SMTP ports.

You can telnet out to port 587 and see if you can connect. If not, you may want to try an alternative port as Mailgun SMTP is also available on 2525.

3reactions
burningTygercommented, Jun 1, 2017

For the sake of documentation let me note that scaleway blocks outgoing smtp ports too. Took me an hour to pinpoint.

Read more comments on GitHub >

github_iconTop Results From Across the Web

sending email times out - Stack Overflow
Trying to send an email keeps giving me timeout errors: Exception while invoking method 'sendEmail' Error: connect ETIMEDOUT.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found