Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't send mail -> getaddrinfo ENOTFOUND your-smtp-host #31

Closed
bertalanimre opened this issue Jun 24, 2020 · 2 comments
Closed

can't send mail -> getaddrinfo ENOTFOUND your-smtp-host #31

bertalanimre opened this issue Jun 24, 2020 · 2 comments

Comments

@bertalanimre
Copy link

Hey Forum,

I've modified my /home/myuser/.pm2/module_conf.json to the following:

{
    "pm2-health": {
        "smtp": {
            "host": "mail.myserver.com",
            "port": 465,
            "user": "TOPSECRET",
            "password": "TOPSECRET",
            "from": "noreply@myserver.com",
            "secure": "true",
            "disabled": false
        },
        "mailTo": "myownemail@mycompany.com",
        "replyTo": "",
        "batchPeriodM": 0,
        "batchMaxMessages": 0,
        "events": [
            "exit,restart"
        ],
        "exceptions": true,
        "messages": true,
        "messageExcludeExps": [],
        "metric": {},
        "metricIntervalS": 60,
        "aliveTimeoutS": 300,
        "addLogs": true,
        "appsExcluded": [],
        "snapshot": {
            "url": "",
            "token": "",
            "auth": {
                "user": "",
                "password": ""
            },
            "disabled": false
        }
    },
    "module-db-v2": {
        "pm2-health": {}
    }
}

However, I'm unable to get it to work because: 0|pm2-heal | 2020-06-24T08:26:48.294Z: can't send mail -> getaddrinfo ENOTFOUND your-smtp-host

Any obvious mistake I made?

@pankleks
Copy link
Owner

looks like smtp address can't be resolved, try to ping address and see what it tells you

@bertalanimre
Copy link
Author

It works, 100% since I use the same SMTP settings for other applications, like Laravel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants