-
Notifications
You must be signed in to change notification settings - Fork 28
Description
"I can no longer send test emails using the 'MJML: Send Email' command from the VS Code extension. The Mailjet APIs work correctly when tested directly through Node.js scripts, but the MJML extension does not send test emails.
node-mailjet: 6.x
Operating System: macOS
Node.js: v20.17.0
Tests performed
I verified that the API keys work correctly by creating a direct test script with node-mailjet:"""
const nodeMailjet = require('node-mailjet')
const mailjet = nodeMailjet.apiConnect(
'API_KEY',
'API_SECRET'
)
mailjet
.post('send', { version: 'v3.1' })
.request({
Messages: [
{
From: {
Email: “test@****.it",
Name: "Dev • *******"
},
To: [
{
Email: "destinatario@email.com",
Name: "Destinatario"
}
],
Subject: "Test API Mailjet diretto",
TextPart: "Test email",
HTMLPart: "<h3>Test email da API Mailjet</h3>"
}
]
})
.then(result => console.log('Success:', result.body))
.catch(err => console.error('Error:', err))
This script works perfectly and sends the email.
Assumption
I suspect that the MJML extension is using an outdated version of the node-mailjet library that is not compatible with the recent changes to the Mailjet API. The initialization syntax has changed from Mailjet.connect() to nodeMailjet.apiConnect() in the latest versions.
Additional Information
I am not receiving any errors in the VS Code console or in the logs.
Request
Would it be possible to update the MJML extension to use the latest syntax of node-mailjet for sending emails? Alternatively, can you specify which version of node-mailjet is supported by the extension so that I can downgrade?
Thank you for your support!