Closed kentdahl closed 2 years ago
Hey, sorry for the very late reply. Can you add the changes to the readme file as well?
I'd only state something on the lines:
This is a breaking change. Please update the config file by adding
'mailgun' => [
'secret' => env('MAILGUN_SECRET', null),
'filter_unknown_emails' => env('EMAIL_LOG_MAILGUN_FILTER_UNKNOWN_EMAILS', true),
],
at the end of the array.
I'll merge it afterwards.
Hey, please look at the 5.2.2. release
This fix will not work.
FIX option 1:
email_log_events.messageId
nullablenull
email_log
once the email has been loggedemail_log_events
with null
on messageId
column every timeFIX option 2 (seems like better approach):
Adds toggle whether MailGun events for (currently) unknown emails should be discarded or not.
This is useful when introducing this package in a system that is already using MailGun with a bit of volume.
With the aggressive attempts at MailGun for getting mails out, you could see up to a few weeks of events being retried as emails are retried again and again by the system.
It is also useful if you often purge / clean out the log table and MailGun still has events related to those mails now deleted from the log table. Similarly when you jump between testing servers and move the MailGun webhooks, the avalanche of unknowns gets cumbersome.
P.S.: The
env('MAILGUN_SECRET', null),
was also changed into a config due to recommendations regarding Laravel configuration caching. (TL;DR: Never useenv
outside ofconfig\
folder.)