@gm5/mail

2.0.0 • Public • Published

downloads version

@gm5/mail

一个简单的邮件发送模块, 可用于发送系统邮件, 如注册验证等。

安装

npm i @gm5/mail

使用

import { createApp } from '@gm5/code'
import { MailModule } from '@gm5/mail'

var app = createApp()

app.install(MailModule, {
    auth: {
      user: 'example@example.com',
      username: 'example',
      pass: '123456'
    } 
  })
  .run()



// in controller 

this.context.$$mail
  .to('tom@xx.com', 'tom')
  .send({
    subject: 'hello',
    text: 'how are you?',
    html: '<p>how are you?</p>'
  })

/@gm5/mail/

    Package Sidebar

    Install

    npm i @gm5/mail

    Weekly Downloads

    1

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    3.47 kB

    Total Files

    4

    Last publish

    Collaborators

    • yutent