Closed rafipiccolo closed 2 years ago
emails are not disabled when following this : https://github.com/mailjet/mailjet-apiv3-nodejs#disable-api-call
i have received an email using this.
import Mailjet from 'node-mailjet'; const mailjet = Mailjet.apiConnect( process.env.TEST_MAILJET_USER, process.env.TEST_MAILJET_PASSWORD, ); try { const result = await mailjet.post('send', { version: 'v3.1' }).request({ Messages: [ { From: { Email: process.env.TEST_MAILJET_FROMEMAIL, Name: process.env.TEST_MAILJET_FROMNAME }, To: [ { Email: process.env.TEST_MAILJET_TOEMAIL, Name: process.env.TEST_MAILJET_TONAME } ], 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!" } ] }, {}, false) console.log(result.body) } catch(err) { console.log(err.statusCode) }
my bad, i wasn't using latest version. (v5)
emails are not disabled when following this : https://github.com/mailjet/mailjet-apiv3-nodejs#disable-api-call
i have received an email using this.