1.1.0 • Published 5 years ago

strapi-provider-email-nodemailer-refactor v1.1.0

Weekly downloads
8
License
MIT
Repository
github
Last release
5 years ago

strapi-provider-email-nodemailer-refactor

Prerequisites

You need to have the plugin strapi-plugin-email installed in you Strapi project.

Installation

# using yarn
yarn add strapi-provider-email-nodemailer-refactor

# using npm
npm install strapi-provider-email-nodemailer-refactor --save

Configuration

VariableTypeDescriptionRequiredDefault
providerstringThe name of the provider you useyes
providerOptionsobjectWill be given to nodemailer.createTransport().yes{}
providerOptions.hoststringIs the hostname or IP address to connect toyesundefined
providerOptions.portstring | numberIs the port to connect to (defaults to 587 if is secure is false or 465 if true)yesundefined
providerOptions.securebooleanIf true the connection will use TLS when connecting to server. If false (the default) then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it falseyesundefined
providerOptions.usernamestringIs the username of your SMTP serveryesundefined
providerOptions.passwordstringIs the password of your SMTP serveryesundefined
settingsobjectDefault Settingsno{}
settings.defaultFromstringDefault sender mail addressnoundefined
settings.defaultReplyTostringDefault address the receiver is asked to reply tonoundefined

See the using a provider documentation for information on installing and using a provider. And see the environment variables for setting and using environment variables in your configs.

Example

./config/plugins.js

module.exports = ({ env }) => ({
  // ...
  email: {
    provider: 'nodemailer-refactor',
    providerOptions: {
      host: env('SMTP_HOST'),
      port: env('SMTP_PORT'),
      secure: env('SMTP_SECURE'),
      username: env('SMTP_USERNAME'),
      password: env('SMTP_PASSWORD'),
    },
    settings: {
      defaultFrom: 'azeazeaze@strapi.io',
      defaultReplyTo: 'azezaeaze@strapi.io',
    },
  },
  // ...
});

Resources

Links

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago