This is a Ghost integration to send newsletters using
Postmark! It can be triggered by receiving a
webhook from your Ghost website, after which it will connect to both the Ghost
API and database file to get your latest post and to send it to your subscribed
users. It uses the codeinjection_foot
field of your posts to remember if
emails were sent out already, so if you use that field this integration won't
work for you.
Usage:
npm i
node index.js --config <file>
node v16.6.0
npm v7.19.1
- Add custom integration with webhook in
<your ghost website domain>/ghost/#/settings/integrations/new
. - Set up a Postmark account and set up a message stream for batch emails / newsletters.
- Populate
config.json
file (seeconfig.example.json
for an example). - Ensure this app is reachable on
<your ghostmark website domain>:<port>
. - Add a webhook in Ghost which can trigger for example when a new post is published. Make it point to:
<webhookUsername>:<webhookPassword>@<your ghostmark domain>:<port>
- Populate your Ghost's
config.production.json
:
"database": {
"client": "sqlite3",
"connection": {
"filename": "<path/to/ghost.db>"
}
},
"mail": {
"from": <Dog> <from@pets.com>",
"transport": "SMTP",
"options": {
"service": "Postmark",
"host": smtp.postmarkapp.com,
"port": 587,
"auth": {
"user": <user>,
"pass": <pass>
}
MIT, see LICENSE