1.2.3 • Published 5 years ago
@wrserver/mail v1.2.3
WRServer/Mail
@wrserver mail module to send email to users.
Installing
Install this library is easy by cloning the repo. You can install trhought npm too:
Local installation
npm install @wrserver/mail
Global installation
npm install -g @wrserver/mail
We recomend to use the entire base package (core, crypt, data, auth, mail)
Mail Service
This module add the MailService to the WRServer Set of elements. It provides a configuration to send email with nodemail library.
Include MailService
At Module defition
import { MailService, MailModule } from '@wrserver/mail';
export class MyModule extends Module {
//... controller, models, etc. ...
public services: ServiceType[] = [ MailService, ... Other Services ... ];
public dependencies: ModuleType[] = [ MailModule, ... Other Modules ... ];
//... rest of code ...
}
MailService Configuration
At Server definition (settings)
import { WRServer }from '@wrserver/core';
import { MailModule } from '@wrserver/data';
//REMEMBER: don't use this static methods inside module definitions
DataModule.withService(<service: email@gmail.com>).withUser(<username>).withPass(<password>)
//Server definition
let server: WRServer = new WRServer(...)
Contacts
If you like the project feel free to contact me on my .
Something gone wrong? Feel free to rise an issue!
Did you like this project and it was usefull? Help me improve my work: