-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
Try to send email via smtpSendMail
method and get the next error in response { error_code: 999, message: 'Badly formed incoming data' }
import sendpulse from 'sendpulse-api';
const config = {
SEND_PULSE_API_USER_ID: 'user_id',
SEND_PULSE_API_SECRET: ''secret,
SENDER_EMAIL_FROM_NAME: 'name',
SENDER_EMAIL_FROM_ADDRESS: 'sender@example.com'
}
const TOKEN_STORAGE = '/tmp/';
const FROM = {
name: config.SENDER_EMAIL_FROM_NAME,
email: config.SENDER_EMAIL_FROM_ADDRESS,
}
sendpulse.init(config.SEND_PULSE_API_USER_ID, config.SEND_PULSE_API_SECRET, TOKEN_STORAGE, function () {
var email = {
html: '<h1>Example text</h1>',
text: 'Example text',
subject: 'Example subject',
from: FROM,
to: [
{
name: 'Piter',
email: 'some@domain.net',
},
],
bcc: [
{
name: 'John',
email: 'some@domain.info',
},
],
};
sendpulse.smtpSendMail((data) => console.log(data), email);
});
Metadata
Metadata
Assignees
Labels
No labels