Answer the question
In order to leave comments, you need to log in
How to catch message_id from Mailgun?
There is Laravel, in which letters are sent through Mailgun, there is a need to write the message_id returned by mailgun to the database when sending a letter. How to catch this same message_id if letters are sent somewhere under the hood of the mailgun itself?
Answer the question
In order to leave comments, you need to log in
when sending a letter, you yourself add it to user-variables
$this->withSwiftMessage(function ($message) {
$message->getHeaders()
->addTextHeader("X-Mailgun-Variables", json_encode([
MailTrackingService::KEY__CUSTOMER_EMAILS__ID => $this->mixins[MailTrackingService::KEY__CUSTOMER_EMAILS__ID],
MailTrackingService::KEY__ENVIRONMENT => \App::environment(),
]));
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question