-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How Do I use Attachment Class ? #47
Comments
The documentation shows you the methods you need to get attachments from an email. Here is some code example assuming you have already retrieved your emails and looping from each to get attachments. if ($email->hasAttachments()) {
// Email has attachments
$attachments = $email->getAttachments()->map(function ($attachment) {
// Save each attachment to your preferred location
return $attachment->saveAttachmentTo('path/to/downloaded/attachments', 'filename', 'disk');
});
// You now have the paths to the downloaded files in the $attachments variable.
} The methods availed to you by the package that I have used in the code above are: |
Okay the one which you share is extremely easy and I gonna replace it with mine one. How I did was
My Bad :-P By the way thank you this package is very helpful. |
Yes it helped me. |
Hey I am implementing Gmail using your package but their is not much info added in this pack document. So at this point I am stuch on Attachment class it would be great if you add more info about how to use that class as I want to download attachment of an email.
The text was updated successfully, but these errors were encountered: