Skip to content

LuxChanLu/moleculer-mailgun

Repository files navigation

moleculer-mailgun

Build Status Coverage Status Codacy Badge Maintainability David Known Vulnerabilities

Downloads FOSSA Status

How to use it

const MailgunMixin = require('moleculer-mailgun')

module.exports = {
  name: 'mailgun',
  mixins: [MailgunMixin],
  settings: {
    mailgun: {
      /** @type {String} Mailgun apiKey (https://app.mailgun.com/app/dashboard). */
      apiKey: '',
      /** @type {String} Mailgun region : US/EU (Default US). */
      region: MailgunMixin.regions.US,
      /** @type {String} Mailgun domain (Can be override by action meta). */
      domain: '',
      /** @type {Object?} Additional options for mailgun contructor */
      options: { },
      /** @type {Number} Max "To" by batch requests (It will chunk list by that, Mailgun limit : 1000) */
      bySendingBatch: 950,
      /** @type {Object?} Defaults options for mailgun send mail */
      defaults: { },
      /** @type {Object?} Webhooks handler (Placeholder {event} for event type) */
      webhooks: {
        /** @type {String?} Action to call after webhooks validated */
        action: undefined,
        /** @type {String?} Event to emit after webhooks validated */
        event: undefined
      }
    }
  }
}

Releases

No releases published

Packages

No packages published