Socket
Book a DemoInstallSign in
Socket

@notadd/addon-mailer

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@notadd/addon-mailer

Package mailer for Notadd.

latest
Source
npmnpm
Version
2.0.6
Version published
Maintainers
3
Created
Source

NotAdd Mailbox delivery plug - in

Function

1.Send mailbox function

2.Custom mailbox template function

3.Mailbox log

Installation

yarn add @notadd/addon-mailer

Use


@Module({
  imports: [EmailModule],
})
import { EmailModule } from "@notadd/addon-mailer";
constructor(@Inject(EmailComponentProvider) private readonly emailComponentProvider: EmailComponentProvider,
){}

//    Call the mail plug-in to send mail
/**
   * Send mail
   * @param mContent replaceModuleParameter
   * @param {number} mid ModuleId
   * @param {[string]} email 
   * @param {string} sender Sender name
   * @param {number} emailConfigId emailConfig Id
   * @returns {Promise<{code; message}>}
   */
   const result = await this.emailComponentProvider.sendEmail(mContent: {name: user.name, pwd: newPassword}, mid: 1, email: [email], sender: "xxx", emailConfigId: 1);
   f (result.code !== 200) {
        return { errno: 400, errmsg: "邮件发送失败,请稍后重试", data: "" };
   }

Keywords

Notadd

FAQs

Package last updated on 16 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts