geenen-mail-mailgun

1.0.1 • Public • Published

Geenen Mail Mailgun service

This is a geenen-mail service for sending emails with MailGun.

Options

  • apiKey // Example: key-mymailgunkey
  • domain // Example: geenentijd.be

Example

This example uses the geenen-mail-mailgun service.

server.register({
  register: require('geenen-mail'),
  options: {
    service: require('geenen-mail-mailgun'),
    options: {
      apiKey: 'key-mymailgunkey',
      domain: 'geenentijd.be'
    }, // Options from the service
    path: `${__dirname}/../templates`, // Required, templates directory
    route: {
      path: '/my/mail/path', // Default /mail
      cors: true, // Default false
      auth: 'myAuth' // Default none
    }, // Optional, will add route to server when defined
    from: 'Glenn Geenen <glenn@geenentijd.be>' // Required, from fallback
    templates: [{
      name: 'contact', // Required, should be name of the hbs file
      subject: 'Contact Form', // Required, subject fallback
      schema: Joi.object({
        message: Joi.string().required()
      }), // Optional, joi validation schema
    }]
  }
});

Package Sidebar

Install

npm i geenen-mail-mailgun

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • glenngeenen