Message id
basvandertogt opened this issue · 5 comments
basvandertogt commented
How can i retrieve the message id from Sendgrid after the mail is sent?
s-ichikawa commented
The send function does not generally return the result value and you can not receive the message id.
But you can do it by the little hack. as following:
- Create a class extends Swift_Events_SendListener, and implement the sendPerformed function to get the message id.
https://github.com/s-ichikawa/laravel58/blob/master/app/Console/Commands/Mail/ApiSimple.php#L76-L95 - Get SwiftMailer from Mailer and register the class created above and re-set SwiftMailer to Mailer.
https://github.com/s-ichikawa/laravel58/blob/master/app/Console/Commands/Mail/ApiSimple.php#L49-L51
s-ichikawa commented
s-ichikawa commented
Sorry, it could be more simple:
s-ichikawa/laravel58@fdc0dbb
s-ichikawa commented
@basvandertogt Did you resolve the issue?
s-ichikawa commented
Please re-open the issue if you have a problem yet.