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

figure out delivery notifications #6

Open
sandys opened this issue May 25, 2017 · 1 comment
Open

figure out delivery notifications #6

sandys opened this issue May 25, 2017 · 1 comment
Assignees

Comments

@sandys
Copy link

sandys commented May 25, 2017

in email, it would be good to have delivery status (in case email was bounced, etc).

@sandys
Copy link
Author

sandys commented May 25, 2017

the way you should be doing this is the following - for each mail in the db, maintain two separate fields : uniqueid and status. when you send the mail through sidekiq, you should not be passing it the message itself.. you should just be passing it message id from db. this is how you avoid duplication of code.

to make it more robust, you must store the to email addresses also in the db. this will solve the problem when email addresses change (e.g. issue #8 ).

sidekiq will pick the email message from the db and send it. when it sends it, it will get a uniqueid from mailgun. write uniqueid to the db and set status as sent (0). later when webhook is called, it will check the uniqueid and update status.

the other advantage of this architecture is you can have scheduled emails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants