You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed this tutorial to test mailersend-nodejs but there is an error message
const Recipient = require("mailersend").Recipient;
const EmailParams = require("mailersend").EmailParams;
const MailerSend = require("mailersend");
const mailersend = new MailerSend({
api_key: "key",
});
const recipients = [
new Recipient("your@client.com", "Your Client")
];
const emailParams = new EmailParams()
.setFrom("your@domain.com")
.setFromName("Your Name")
.setRecipients(recipients)
.setSubject("Subject")
.setHtml("This is the HTML content")
.setText("This is the text content");
mailersend.send(emailParams);
./node_modules/mailersend/src/modules/email.js:5
let emailObject = new EmailObject(emailParams)
^
TypeError: EmailObject is not a constructor
at MailerSend.send (./node_modules/mailersend/src/modules/email.js:5:23)
at Object.<anonymous> (./index.js:33:12)
The text was updated successfully, but these errors were encountered:
I followed this tutorial to test mailersend-nodejs but there is an error message
The text was updated successfully, but these errors were encountered: