strapi-provider-email-googleapis

1.0.4 • Public • Published

strapi-provider-email-googleapis

Email provider for Strapi v3 and Strapi v4 based on Gmail API

Installation

yarn add strapi-provider-email-googleapis

For Strapi v4

yarn add @strapi/provider-email-googleapis@npm:strapi-provider-email-googleapis

Setup

  1. Follow these instructions

  2. Configure the provider in config/plugins

Variable Type Description Required Default
provider string The name of the provider you use yes
providerOptions object Provider options yes
providerOptions.credentialsPath string Path to credentials.json yes
providerOptions.tokenPath string Path to token.json yes
settings object Settings yes
settings.defaultFrom string Default sender mail address yes
settings.defaultReplyTo string Default address or addresses the receiver is asked to reply to no settings.defaultFrom

Example

Path - config/plugins.js

const path = require("path");

module.exports = ({ env }) => ({
  // ...
  email: {
    config: {
      provider: "googleapis",
      providerOptions: {
        credentialsPath: path.join(__dirname, "../credentials.json"),
        tokenPath: path.join(__dirname, "../token.json"),
      },
      settings: {
        defaultFrom: "mail@example.com",
        defaultReplyTo: "mail@example.com",
      },
    },
  },
  // ...
});

Resources

Package Sidebar

Install

npm i strapi-provider-email-googleapis

Weekly Downloads

5

Version

1.0.4

License

MIT

Unpacked Size

5.77 kB

Total Files

4

Last publish

Collaborators

  • ivangonzalezg