You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
in email, it would be good to have delivery status (in case email was bounced, etc).
The text was updated successfully, but these errors were encountered: