Meteor email package throws a timeout all of a sudden

Hello everyone,

never had an issue with the email package from Meteor but now all of a sudden it throws a timeout and my app is no longer able to send out emails. Here’s the log file:

Error: Greeting never received
    at SMTPConnection._formatError (/Users/andreaswest/.meteor/packages/email/.2.2.0.f77o92.3qbzk++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/nodemailer/lib/smtp-connection/index.js:784:19)
    at SMTPConnection._onError (/Users/andreaswest/.meteor/packages/email/.2.2.0.f77o92.3qbzk++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/nodemailer/lib/smtp-connection/index.js:770:20)
    at Timeout.<anonymous> (/Users/andreaswest/.meteor/packages/email/.2.2.0.f77o92.3qbzk++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/nodemailer/lib/smtp-connection/index.js:704:22)
    at listOnTimeout (internal/timers.js:557:17)
    at processTimers (internal/timers.js:500:7)

Using Meteor version 2.5.8 and Node version 14.19.1

What can be the cause of it and how can I isolate the problem? It was working fine so far.

Thanks in advance!

I’ve removed all node_packages and reinstalled all of them but the error is still there.

The problem hasn’t shown up in the production, only in development environment.

Can’t say for sure but this looks like the connection times out while trying to connect to the SMTP server.

So this is a general error that should happen to others as well?

No, it probably doesn’t happen to others.
What does your SMTP settings or string look like?
Did you, by any chance, activate 2FA for the account that you might be using to send out emails?!


I’m using Mailhog and it’s running (it gets started upon login by Brew), I can check the inbox at URL http://localhost:8025/

Screenshot 2023-02-22 at 14.33.36

How can I test it out further to isolate the problem (on my computer). I restarted the Mac yesterday as it has updated to a new version and yes, the problem started to show exactly after the restart. So some sort of setting or configuration changed or broke but I have no clue which one.

Many thanks for your help, I would be lost without you guys!

I’ve followed the instructions in: How to Use MailHog to Test Emails Locally (Step-by-Step Guide) to send a test mail via:

However, it fails:

mhsendmail test@mailhog.local <<EOF
> From: Salman <kinsta@mailhog.local>
> To: Test <test@mailhog.local>
> Subject: Hello, MailHog!
> Hey there,
> Missing you pig time.
> Hogs & Kisses,
> Salman
-bash: mhsendmail: command not found

So it seems there’s something wrong with the installation, that mhsendmail (which is apparently used by Mailhog) isn’t installed properly.

I’ve noticed that when I restart the mailhog service that Apple notifies me with a popup for “Background Items Added”. This is a new feature they added, might be it’s the culprit though it’s turned on:

Screenshot 2023-02-22 at 14.44.28

Ok, this looks like not-a-meteor problem.

Unfortunately yes :frowning: