/email

Provide Email Service implement by NodeJs

Primary LanguageJavaScriptMIT LicenseMIT

Provide Email Service implement by NodeJs

Build Status Dependency License Prettier Node heroku Size

Deploy at heroku

Server:https://email-bot.herokuapp.com

Usage

interface Options{
    from: string,
    to: string,
    subject: string,
    text: string,
    html: string
}

.get('/')

query: Options

Example:

fetch(
  'https://email-bot.herokuapp.com?from=Axetroy <axetroy@163.com>&to=example@gmail.com&subject=hello&text=hello&html=<h2>hello</h2>'
)
  .then(function(res) {
    console.log(res);
  })
  .catch(function(err) {
    console.log(err);
  });

.post('/')

Example:

fetch('https://email-bot.herokuapp.com', {
  method: 'POST',
  body: JSON.stringify({
    from: 'Axetroy <axetroy@163.com>',
    to: 'example@gmail.com',
    subject: 'hello',
    text: 'hello',
    html: '<h2>hello</h2>'
  })
})
  .then(function(res) {
    console.log(res);
  })
  .catch(function(err) {
    console.log(err);
  });

Contributing

git clone https://github.com/axetroy/email-service.git
cd ./email-service
yarn
yarn start

You can flow Contribute Guide

Contributors


Axetroy

💻 🔌 ⚠️ 🐛 🎨

License

The MIT License