code: function (config) {
    if (config) {
      this.config = config;
  
      if (!this.config.service || (this.config.service != 'sendgrid' && this.config.service != 'postmark')) {
        throw new Error('Please specify which service you want to use - sendgrid or postmark');
      }
  
      this.config.service = this.config.service.toLowerCase();
  
      // Default template type
      // Helps when using ejs or any other templates
      if (!this.config.tplType) this.config.tplType = 'pug';
  
      if (config.email && !config.tplPath && !fs.exists(config.tplPath)) {
        throw new Error('Please provide correct path to the templates.');
      }
    }
  }
docs: Initialize notifier
  
  @api public