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

connect ETIMEDOUT 35.187.79.8:443 #266

Open
jeremyikwuje opened this issue Dec 3, 2023 · 4 comments
Open

connect ETIMEDOUT 35.187.79.8:443 #266

jeremyikwuje opened this issue Dec 3, 2023 · 4 comments

Comments

@jeremyikwuje
Copy link

jeremyikwuje commented Dec 3, 2023

I'm trying to send an email using the official TS library, but I keep getting a Timeout error. Here is a sample of my code:

const mailjet = new Mailjet({
    apiKey: config.mailjet.key,
    apiSecret: config.mailjet.secret,
    options: {
        timeout: 50000
    }
});

const request = mailjet
        .post('send', { 
            version: 'v3.1',
        })
        .request({
            Messages: [
                {
                    From: {
                        Email: "notification@notification.example.com",
                        Name: "Company"
                    },
                    To: [
                        {
                            Email: "example@gmail.com",
                            Name: "Jeremy Ikwuje"
                        }
                    ],
                    Subject: "Your email flight plan!",
                    TextPart: "Dear passenger 1, welcome to Mailjet! May the delivery force be with you!",
                    HTMLPart: "<h3>Dear passenger 1, welcome to <a href=\"https://www.mailjet.com/\">Mailjet</a>!</h3><br />May the delivery force be with you!"
                }
            ]
        })

    request
        .then( (result) => {
            console.log(result.body)
        })
        .catch( (err) => {
            console.log(err.statusCode, err)
        })

Need a solution to this.

@zallesov
Copy link

Came here with the same issue. Have you solved it?

@henri9813
Copy link

No one have a solution for this ?

@jeremyikwuje
Copy link
Author

Oh yeah, I did. Just some modifications in the recipient payload.

@henri9813
Copy link

Hello,

Can you share the modifications ?

Thanks !

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

3 participants