Package Exports
- @envialosimple/transaccional
- @envialosimple/transaccional/src/index.ts
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@envialosimple/transaccional) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
EnvíaloSimple Transaccional - Node.js SDK
Requirements
- Node.js 18 or higher
- EnvíaloSimple Transaccional API Key (Create a demo account for free here)
Installation
npm install @envialosimple/transaccionalBasic Usage
import { Transaccional, MailParams } from "@envialosimple/transaccional";
const estr = Transaccional(your_api_key);
const params = new MailParams();
params
.setFrom('no-reply@mycompany.com', 'MyCompany Notifications')
.setTo('john.doe@example.com', 'John Doe')
.setSubject('This is a test for {{name}}')
.setHtml('<h1>HTML emails are cool, {{name}}</h1>')
.setText('Text emails are also cool, {{name}}')
.setSubstitutions({name: 'John'});
await estr.mail.send(params);