+
Skip to content

Send email not working #63

@fparrella

Description

@fparrella

"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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载