Skip to content

Commit

Permalink
Merge pull request #9 from dostuffthatmatters/master
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottAgirs authored Dec 13, 2021
2 parents bc9c4db + 19dec93 commit 15a3e01
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 16 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.0.0] - 2021-12-12

### [4.0.0] Release

- Upgrades to `[email protected]`
- Upgrades to `[email protected]`

## [3.5.1] - 2021-03-17

### Fixed
Expand Down
32 changes: 20 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,32 @@ Path - `config/plugins.js`
module.exports = ({ env }) => ({
// ...
email: {
provider: "postmark",
providerOptions: {
apiKey: "your-postmark-api-key",
},
settings: {
defaultMessageStream: "my-stream",
defaultFrom: "[email protected]",
defaultTo: "[email protected]",
defaultReplyTo: "[email protected]",
defaultVariables: {
sentBy: 'strapi',
config: {
provider: "strapi-provider-email-postmark",
providerOptions: {
apiKey: "your-postmark-api-key",
},
},
settings: {
defaultMessageStream: "my-stream",
defaultFrom: "[email protected]",
defaultTo: "[email protected]",
defaultReplyTo: "[email protected]",
defaultVariables: {
sentBy: 'strapi',
},
},
}
},
// ...
});
```

**IMPORTANT:** With Strapi v4, you have to set `email.config.provider` to "strapi-provider-email-postmark", instead of "postmark". This is intended in Strapi v4: https://github.com/strapi/strapi/issues/11879.

Additionally, the structure of `plugins.js` has changed:
- In v3: `"email": {"provider": "", ...}`
- In v4: `"email": {"config": {"provider": "", ...}}`

### Usage

Call the `send` function on the email service, as you would for any strapi email service.
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const postmark = require("postmark");
const { removeUndefined } = require('strapi-utils');
const { removeUndefined } = require('@strapi/utils');

module.exports = {
init: (providerOptions = {}, settings = {}) => {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "strapi-provider-email-postmark",
"version": "3.5.1",
"version": "4.0.0",
"description": "Strapi Email service provider for Postmark",
"author": {
"email": "[email protected]",
Expand All @@ -11,8 +11,8 @@
},
"main": "./lib",
"dependencies": {
"postmark": "^2.5.4",
"strapi-utils": "3.0.4"
"postmark": "^2.7.8",
"@strapi/utils": "4.0.0"
},
"strapi": {
"isProvider": true
Expand Down

0 comments on commit 15a3e01

Please sign in to comment.