Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃摦 Postmark integration #19398

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open

Conversation

andreascreten
Copy link

@andreascreten andreascreten commented Dec 19, 2023

I have been working on an integration of Postmark with Ghost. Please provide your feedback before I continue.

To-Do

  • Implement analytics
  • Handle Postmark errors
  • Add tests

@github-actions github-actions bot added the affects:admin Anything relating to Ghost Admin label Dec 19, 2023
Copy link
Contributor

It looks like this PR contains a migration 馃憖
Here's the checklist for reviewing migrations:

General requirements

  • Satisfies idempotency requirement (both up() and down())
  • Does not reference models
  • Filename is in the correct format (and correctly ordered)
  • Targets the next minor version
  • All code paths have appropriate log messages
  • Uses the correct utils
  • Contains a minimal changeset
  • Does not mix DDL/DML operations

Schema changes

  • Both schema change and related migration have been implemented
  • For index changes: has been performance tested for large tables
  • For new tables/columns: fields use the appropriate predefined field lengths
  • For new tables/columns: field names follow the appropriate conventions
  • Does not drop a non-alpha table outside of a major version

Data changes

  • Mass updates/inserts are batched appropriately
  • Does not loop over large tables/datasets
  • Defends against missing or invalid data
  • For settings updates: follows the appropriate guidelines

@github-actions github-actions bot added the migration [pull request] Includes migration for review label Dec 19, 2023
@andreascreten andreascreten changed the title Postmark integration 馃摦 Postmark integration Jan 16, 2024
@andreascreten andreascreten marked this pull request as ready for review January 16, 2024 14:19
@markstos
Copy link
Contributor

Hello @andreascreten, I'm not a Ghost core team member, but am someone who previously submitted my own PR to allow non-mailgun senders ( #14984 ), so I can give you some feedback from that perspective. (Ultimately, I ended up using Mailgun and abandoned that effort).

I don't think there's a lot of appetite for maintaining non-Mailgun code in the core with their small team, but I think there /is/ interest in implementing an adapter pattern for bulk-email and email-analytics so other options can be plugged in and, crucially, completely maintained by third-parties outside of the core.

So I think the ideal PR implements the adapter pattern and has Mailgun as the included, default solution implementing that package. There would actually be no references to Postmark in the PR, but the PR would enable you make the swap using the config file system and third-party modules that implement bulk-sending and analytics. The rest of your solution would in modules you maintain and possibly publish to NPM yourself.

I see you made some progress in that direction replacing explicit references to MailGun with more generic "Bulk Email" or "Email Analytics" language when that part of the code has multiple possible implementations.

References

What appears to be happening is that a path to where a custom solution is stored gets declared under the "adapters" section in the config file. If this is not present, the internal implementation in used.

Admin UX

I saw your PR also took care of getting some Postmark bits to appear in the admin UI. I'm not sure the current adapter pattern covers that. What's there so far may only cover purely backend tasks, like swapping out data storage. It's possible you need to extend the adapter system to allow modules that implement the adapter system to have bits appear in the admin UI when they are loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:admin Anything relating to Ghost Admin migration [pull request] Includes migration for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants