2.0.0 • Published 4 years ago

strapi-provider-email-nodemailer-force-default v2.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

strapi-provider-email-nodemailer

Nodemailer provider for Strapi with attachments support for latest Strapi versions.

Made by Automat-IT

Installation

npm i strapi-provider-email-nodemailer

Configuration

The Nodemailer provider can be enabled in the Strapi Admin UI via Plugins -> Emails -> Option Symbol. After selecting Nodemailer as the provider the are the following fields.

FieldDescription
Nodemailer_Default_FromDefault sender address if noone is provided
Nodemailer_Default_Reply-ToDefault responder address if noone is provided
Hosthostname or IP address to connect to (smtp.your-server.de)
Portport to connect to (in most cases: 587, 465 or 25)
Usernameauthorisation name
Passwordauthorisation pass
Secureif 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 false
Auth_Methodcurrently there are 2 Authentication Methods available:SMTP (Plain and Login) and NLMT

Usage

To use the Nodemailer provider the plugin needs to be activated and configured. You can call the Nodemailer in any controller or service via the Strapi email plugin.

strapi.plugins['email'].services.email.send({
  to: '',
  from: '',
  subject:  '',
  text:  '',
  html:  ''
})

Currently the following fields are supported:

FieldDescription
fromEmail address of the sender (e.g.'sender@example.com' or '"Sender Name" sender@server.com')
toComma separated list or an array of recipients
ccComma separated list or an array of recipients
bccComma separated list or an array of recipients
subjectSubject of the email
textPlaintext version of the message
htmlHTML version of the message
attachmentsArray of objects See: https://nodemailer.com/message/attachments/

Links

Resources