strapi-provider-email-googleapis

Googleapis provider for Strapi

Usage no npm install needed!

<script type="module">
  import strapiProviderEmailGoogleapis from 'https://cdn.skypack.dev/strapi-provider-email-googleapis';
</script>

README

strapi-provider-email-googleapis

Email provider for Strapi based on Gmail API

Installation

# using yarn
yarn add strapi-provider-email-googleapis

# using npm
npm install strapi-provider-email-googleapis --save

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

module.exports = ({ env }) => ({
  // ...
  email: {
    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