jdavidbakr / mail-tracker

Package for Laravel to inject tracking code into outgoing emails.
MIT License
577 stars 129 forks source link

Sorry I have a problem about ViewEmailEvent #123

Closed kamonth88 closed 3 years ago

kamonth88 commented 3 years ago

i sent email from my gmail to my another gmail , when i sent , i can track EmailSentEvent , but i cannot track ViewEmailEvent. how can i do? or i miss something.

my EmailViewListener

public function handle(ViewEmailEvent $event) { $model_id = $event->sent_email->getHeader('X-Model-ID'); $my_model= MyModel::findOrFail($model_id); $my_model->read_yet = 2; $my_model->read_datetgime = Carbon::now(); $my_model->save(); }

my EmailSendListener

public function handle(EmailSentEvent $event) { $model_id = $event->sent_email->getHeader('X-Model-ID'); $my_model= MyModel::findOrFail($model_id); $my_model->sent_yet = 2; $my_model->sent_datetgime = Carbon::now(); $my_model->save(); }

kamonth88 commented 3 years ago

sorry , i forgot content-type