strapi-provider-email-postal
v1.0.0
Published
Postal email provider for strapi
Maintainers
Readme
Strapi provider email postal
A custom email provider for Strapi that allows sending emails via Postal RestAPI [https://docs.postalserver.io/]. You can read about mailing in official documentation
Compatibility
- Strapi v5.x (May older version will work, but it's not tested)
- Node.js >= 20
Installation
Install the package using NPM:
npm install strapi-provider-email-postalConfiguration
Add environment variables
Add following env variables to .env file:
POSTAL_SERVER= # JUST DOMAIN WITHOUT PROTOCOL e.g. postal.example.dev
POSTAL_API_KEY= # Postal API key from Credentials > API KeyIn strapi configuration file config/plugins.js|ts enable plugin using:
Set postal as default email provider
module.exports = ({ env }) => ({
...
email: {
config: {
provider: 'strapi-provider-email-postal',
providerOptions: {
postalServer: env('POSTAL_SERVER'), // Required !! JUST DOMAIN WITHOUT PROTOCOL !!
apiKey: env('POSTAL_API_KEY'), // Required
debug: false // Optional, default false !! set to true for local testing only !!
},
settings: {
defaultFrom: '[email protected]', // Change
defaultReplyTo: '[email protected]', // Change
},
}
},
});When debug is enabled, the provider will:
- log request payloads
- log Postal API responses
- skip silent error handling
Usage example
await strapi.plugin('email').service('email').send({
to: '[email protected]',
subject: 'Test email',
text: 'Hello from Strapi + Postal',
});