Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/isleshocky77/google-mail-attachment-downloader
This script downloads all attachments from Google Mail (Gmail) Emails for a given query.
https://github.com/isleshocky77/google-mail-attachment-downloader
attachments downloader gmail google mail
Last synced: about 1 month ago
JSON representation
This script downloads all attachments from Google Mail (Gmail) Emails for a given query.
- Host: GitHub
- URL: https://github.com/isleshocky77/google-mail-attachment-downloader
- Owner: isleshocky77
- License: agpl-3.0
- Created: 2022-04-05T15:44:31.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-03-04T21:21:06.000Z (11 months ago)
- Last Synced: 2024-11-07T02:18:51.914Z (3 months ago)
- Topics: attachments, downloader, gmail, google, mail
- Language: PHP
- Homepage:
- Size: 108 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Google Mail Attachment Downloader
This script downloads all attachments from Google Mail (Gmail) Emails for a given query.
## Installation
```shell
git clone https://github.com/isleshocky77/google-mail-attachment-downloader.git
cd google-mail-attachment-downloader
composer install
```### Google Apps Authentication
You must create a [Google Cloud Application](https://console.cloud.google.com/), get the credentials and place them at `auth/credentials.json`.
On first run it will ask you to go a url to authorize the application with instructions.## Usage
```shell
./bin/console -vvv gmail-file-downloader:download-attachments --query="label:emails-i-need"# Multiple query criteria
./bin/console -vvv gmail-file-downloader:download-attachments --query="label:emails-i-need" --query="from:[email protected]"
```### Continuing
The verbose email will print out page numbers with a page token. If you need to stop or there is an error
you can pick up where it left with the following```shell
./bin/console -vvv gmail-file-downloader:download-attachments --query="label:emails-i-need" --starting-page-token=06638643197320647210
```## Development
### Tools
```shell
./bin/php-cs-fixer fix
./bin/phpstan
./bin/phpmd src/ text phpmd.xml.dist
./bin/psalm --show-info=true
```