Hi, I'm unable to send a transactional email, does a complete example exists to do that?
No template.
sib-api-v3-sdk = 6.0.0.
Following the existing example:
this.sendSmtpEmail.sender = new this.SibApiV3Sdk.SendSmtpEmailSender();
this.sendSmtpEmail.sender.name = "name";
this.sendSmtpEmail.sender.email = "account@email.ext";
this.sendSmtpEmail.replyTo = new this.SibApiV3Sdk.SendSmtpEmailReplyTo();
this.sendSmtpEmail.replyTo.name = "name";
this.sendSmtpEmail.replyTo.email = "account@email.ext";
this.sendSmtpEmail.subject = "subject";
this.sendSmtpEmail.htmlContent = '<p>test</p>';
this.sendSmtpEmail.textContent = 'please, use an email agent that support html';
this.sendSmtpEmail.to = new this.SibApiV3Sdk.SendSmtpEmailTo();
this.sendSmtpEmail.to.name = "destination@email.ext";
this.sendSmtpEmail.to.email = "destination@email.ext";
/*i tried whit this : same error*/
let body = {"sender":{"name":"nozone","email":def.from},
"replyTo":{"email":def.from,"name":"nozone"},
"subject":def.subject,
"htmlContent":`<p>test</p>`,
"textContent":'please, use an email agent that support html',
"to":{"email":def.to,"name":def.to}};
await this.apiInstance.sendTransacEmail(this.sendSmtpEmail); //bad request received
Hi, I'm unable to send a transactional email, does a complete example exists to do that? No template. sib-api-v3-sdk = 6.0.0.
Following the existing example: