mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Fixes for mail sent listener
This commit is contained in:
parent
05559feeb2
commit
2ec8e21506
@ -35,17 +35,19 @@ class MailSentListener implements ShouldQueue
|
||||
*/
|
||||
public function handle(MessageSent $event)
|
||||
{
|
||||
if (property_exists($event->message, 'invitation') && $event->message->invitation) {
|
||||
MultiDB::setDb($event->sent->invitation->company->db);
|
||||
nlog("mail listener");
|
||||
nlog($event);
|
||||
// if (property_exists($event->message, 'invitation') && $event->message->invitation) {
|
||||
// MultiDB::setDb($event->sent->invitation->company->db);
|
||||
|
||||
if ($event->message->getHeaders()->get('x-pm-message-id')) {
|
||||
$postmark_id = $event->sent->getHeaders()->get('x-pm-message-id')->getValue();
|
||||
// if ($event->message->getHeaders()->get('x-pm-message-id')) {
|
||||
// $postmark_id = $event->sent->getHeaders()->get('x-pm-message-id')->getValue();
|
||||
|
||||
// nlog($postmark_id);
|
||||
$invitation = $event->sent->invitation;
|
||||
$invitation->message_id = $postmark_id;
|
||||
$invitation->save();
|
||||
}
|
||||
}
|
||||
// // nlog($postmark_id);
|
||||
// $invitation = $event->sent->invitation;
|
||||
// $invitation->message_id = $postmark_id;
|
||||
// $invitation->save();
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
@ -271,9 +271,9 @@ class EventServiceProvider extends ServiceProvider
|
||||
],
|
||||
MessageSending::class => [
|
||||
],
|
||||
MessageSent::class => [
|
||||
MailSentListener::class,
|
||||
],
|
||||
// MessageSent::class => [
|
||||
// MailSentListener::class,
|
||||
// ],
|
||||
UserWasCreated::class => [
|
||||
CreatedUserActivity::class,
|
||||
SendVerificationNotification::class,
|
||||
|
Loading…
Reference in New Issue
Block a user