@styfrombrest/mailer
v1.0.0
Published
NodeJS mailer
Readme
@styfrombrest/mailer
Internal mailer for my pet projects.
It uses nodemailer under the hood to send an email from nodejs script.
Usage:
const result = await sendMail(config: ISendMailerOptions, mailOptions: IMailOptions);
interface IMailOptions {
from: string;
to: string;
subject?: string;
text?: string;
html?: string;
}interface ISendMailerOptions {
host: string;
port: number;
secure?: boolean;
auth: {
user: string;
pass: string;
}
}Troubleshooting:
- for yandex
IMailOptions.frommust be the same asISendMailerOptions.auth.useotherwise it won't accept email to send
