dacastro4 / laravel-gmail

Laravel wrapper for the Gmail API
MIT License
292 stars 134 forks source link

Attachment issues #217

Open ChrisSantiago82 opened 2 years ago

ChrisSantiago82 commented 2 years ago

I'm having a fight with attachments. I'm sure I'm doing something wrong.

I'm trying to get all attachments of all mails.

If I do this: `$messages = LaravelGmail::message()->preload()->all();'

And then if I loop and use the "hasAttachments" it never is true, even if there are a lots of files: foreach ($messages as $message) { if ($message->hasAttachments()) { } }

If I get the emails with this with hasAttachment: $messages = LaravelGmail::message()->hasAttachment()->preload()->all(); I'm getting an "Request is missing required authentication credential" image