0.0.1-beta.0 • Published 6 years ago
curli-nodemailer-module v0.0.1-beta.0
curli-nodemailer-module
Nodemailer implementation for the Curli framework.
Installation
Install by npm
npm install --save curli-nodemailer-moduleBasic Usage
1 - In the configurations file, declare de followings properties:
@TRANSPORT_TYPE: (string) The type of transport we will use: 'smtp' | 'ses' | 'sendmail' @TRANSPORTS_CONFIGURATION (object) An object with the configuration for the types. A configuration for the type selected must be present.
Eg:
{ 'transporter_smtp': { 'host': 'smtp.gmail.com', 'port': 587, 'secure': false, 'user': 'one@gmail.com', 'pass': 'password', } }
2 - Add the module definer:
import {NodemailerModule} from "curli-nodemailer-module";
  app.addModules(new NodemailerModule(app));3 - Send an email
await this.container.get('email').send({
     from: "sender@server.com",
     to: "receiver@sender.com",
     subject: "Message title",
     text: "Plaintext version of the message",
     html: "<p>HTML version of the message</p>"
   });Commands
- npm run build: Build the project (Curli Mikro Orm).
- npm run build:clean: Delete first the dist folder and build it.
- npm run clean: Delete the dist folder.
- npm run test: Execute the tests.
- npm run test:coverage: Execute the tests and calculate the coverage.
- npm run lint: Check the code using the rules in .eslintre.js
- npm run lint:fix: Check the code and try to fix it.
License
MIT
0.0.1-beta.0
6 years ago