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
import{Transaccional,MailParams}from"@envialosimple/transaccional";constestr=newTransaccional(your_api_key);constparams=newMailParams();params.setFrom('no-reply@mycompany.com','MyCompany Notifications').setTo('john.doe@example.com','John Doe').setReplyTo('reply@here.com').setSubject('This is a test for {{name}}').setPreviewText('A glimpse of what comes next...').setHtml('<h1>HTML emails are cool, {{name}}</h1>').setText('Text emails are also cool, {{name}}').setContext({name: 'John'});awaitestr.mail.send(params);
Multiple Recipients Usage
import{Transaccional,MailParams}from"@envialosimple/transaccional";constestr=newTransaccional(your_api_key);constparams=newMailParams();params.setFrom('no-reply@mycompany.com','MyCompany Notifications').setTo([{email: 'john.doe@example.com',name: 'John Doe'},{email: 'jane.doe@example.com',name: 'Jane Doe'},{email: 'sean.doe@example.com'},]).setReplyTo('reply@here.com').setSubject('This is a test for {{name}}').setPreviewText('A glimpse of what comes next...').setHtml('<h1>HTML emails are cool, {{name}}</h1>').setText('Text emails are also cool, {{name}}').setContext({name: 'John'});awaitestr.mail.send(params);