Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shalinir8/emailexportautomation
This automates exporting emails and clearing inbox to avoid reaching email capacity
https://github.com/shalinir8/emailexportautomation
Last synced: 6 days ago
JSON representation
This automates exporting emails and clearing inbox to avoid reaching email capacity
- Host: GitHub
- URL: https://github.com/shalinir8/emailexportautomation
- Owner: ShaliniR8
- Created: 2024-06-04T16:07:49.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-06-05T20:35:28.000Z (8 months ago)
- Last Synced: 2024-06-06T19:34:13.522Z (8 months ago)
- Language: Ruby
- Size: 29.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# README
### Ruby version:
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]### Add a email_settings.rb file with the required IMAP settings.
This project is setup for IONOS mail server. Please refer to [IONOS Email: Server Data for IMAP, POP3, and SMTP](https://www.ionos.com/help/email/general-topics/settings-for-your-email-programs-imap-pop3/) for more information.> `cd config/initializers`
>
> `touch email_settings.rb````
require 'net/imap'
require 'mail'IMAP_SETTINGS = {
address: xxx,
port: xxx,
user_name: xxx,
password: xxx,
enable_ssl: true
}.freeze```
### Set up a cron task to automate this job
The email_tasks.rake can run on a required interval to automate the process. I like to set it up for daily execution.> `crontab -e`
```
0 10 * * * /bin/bash -l -c "cd /personal-rails/EmailAutomation/ && /home/prdg/.rvm/gems/ruby-2.7.2/bin/rake email:export_and_delete"
```