1.0.4 • Published 1 year ago

strapi-provider-email-googleapis v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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

VariableTypeDescriptionRequiredDefault
providerstringThe name of the provider you useyes
providerOptionsobjectProvider optionsyes
providerOptions.credentialsPathstringPath to credentials.jsonyes
providerOptions.tokenPathstringPath to token.jsonyes
settingsobjectSettingsyes
settings.defaultFromstringDefault sender mail addressyes
settings.defaultReplyTostringDefault address or addresses the receiver is asked to reply tonosettings.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