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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppressions list #29

Merged
merged 48 commits into from
Jan 23, 2025
Merged

Suppressions list #29

merged 48 commits into from
Jan 23, 2025

Conversation

arduinomaster22
Copy link
Contributor

@arduinomaster22 arduinomaster22 commented Jan 13, 2025

This pull request introduces a new feature to handle email unsuppression and includes necessary database schema changes, event handling, and updates to mail driver classes. The most important changes are listed below:

Database Migration

  • Added a new database migration to include unsuppressed_at timestamp in mail_events table and driver and stream_id columns in mails table.

Mail Driver Updates

  • MailgunDriver: Introduced unsuppressEmailAddress method to handle unsuppression of email addresses using Mailgun API.
  • PostmarkDriver: Introduced unsuppressEmailAddress method to handle unsuppression of email addresses using Postmark API.

Event and Listener

  • Created MailUnsuppressed event to trigger when an email address is unsuppressed.
  • Created UnsuppressEmailAddress listener to handle the MailUnsuppressed event and call the appropriate mail driver method.

Service Provider

  • Updated MailsServiceProvider to register the new MailUnsuppressed event and its listener, and to include the new migration. [1] [2] [3]

@arduinomaster22 arduinomaster22 force-pushed the feature/suppressions-list branch from 9489724 to 6a364f4 Compare January 13, 2025 14:19
@arduinomaster22 arduinomaster22 force-pushed the feature/suppressions-list branch from d9231c5 to 55695c6 Compare January 13, 2025 14:21
Copy link
Member

@markvaneijk markvaneijk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omdat we voor het mailEvent moeten weten met welke driver de mail is verzonden, moeten we bij de mails opslaan welke driver de mail verzond. Dit mag dus worden opgeslagen in de database (na de uuid kolom).

Daarnaast moeten we hierbij ook de stream opslaan in de database (voor postmark) zodat we daarmee de unsupress API call kunnen doen. Deze kolom mag dan na de driver kolom.

src/Drivers/MailgunDriver.php Outdated Show resolved Hide resolved
src/Listeners/UnsuppressEmailAddress.php Outdated Show resolved Hide resolved
src/Models/MailEvent.php Outdated Show resolved Hide resolved
src/Listeners/UnsuppressEmailAddress.php Outdated Show resolved Hide resolved
src/Drivers/PostmarkDriver.php Outdated Show resolved Hide resolved
src/Drivers/MailgunDriver.php Outdated Show resolved Hide resolved
Copy link
Member

@markvaneijk markvaneijk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zie feedback

@arduinomaster22
Copy link
Contributor Author

@markvaneijk het enige puntje is nu nog het aanmaken van de stream_id in de DB. Die komt neem ik aan van Postmark af....

Hoe moet dat eruit komen te zien?

@arduinomaster22 arduinomaster22 force-pushed the feature/suppressions-list branch from d6912ef to a37d7ec Compare January 23, 2025 10:20
@arduinomaster22 arduinomaster22 merged commit 301f18b into main Jan 23, 2025
2 of 15 checks passed
@arduinomaster22 arduinomaster22 deleted the feature/suppressions-list branch January 23, 2025 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants