Socket
Socket
Sign inDemoInstall

strapi-provider-email-smtp-image-base64

Package Overview
Dependencies
45
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    strapi-provider-email-smtp-image-base64

Nodemailer email provider via SMTP with support Base64 image in html content


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
10.9 MB
Created
Weekly downloads
 

Readme

Source

strapi-provider-email-gmail-oauth2-image-base64

Demo

Demo result/

Note

Strapi email provider send mail via SMTP with support insert base64 image in html content of email.

Usage

Configure the provider in [strapi-dir]/config/plugins.

Example

Path - config/plugins.js

module.exports = ({ env }) => ({
  // ...
  email: {
    provider: "smtp-image-base64",
    providerOptions: {
      host: env("SMTP_HOST"), //SMTP Host
      port: env("SMTP_PORT"),   , //SMTP Port
      secure: env("SMTP_SECURE") || true,
      username: env("SMTP_USERNAME"),
      password: env("SMTP_PASSWORD"),
      rejectUnauthorized: env("SMTP_REJECT_UNAUTHORIZED") || true,
      requireTLS: env("SMTP_REQUIRE_TLS") || true,
      connectionTimeout: env("SMTP_TIMEOUT") || 1,  // 1 minute
    },
    settings: {
      defaultFrom: env("EMAIL_USERNAME"),
      defaultReplyTo: env("EMAIL_USERNAME"),
    },
  },
  // ...
});

TIP: You can using environment file (.env) in the root of project for store variable.

Enable/Disable base64 image in html email content

If you email don't have base64 image, you can disable this feature by adding a key in options email like this:

await strapi.plugins.email.services.email.sendTemplatedEmail(
      {
        to: data?.email,
        hasBase64Image: false,
      },
      emailTemplate,
      {
        data,
      }
    );

Resources

  • MIT License

Installation

npm i -s strapi-provider-email-gmail-oauth2-image-base64

Keywords

FAQs

Last updated on 06 Jan 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc