python-emailer
A small script to send dog pictures to myself every hour via email.
E-Mail Sample
How to get a dog in your e-mail
Raise an issue with your email-id and the frequency with which you want to receive cute dog pics and I'll add you to the mailing list.
Automated with Github Actions
The email.yml file builds a python 3.8 environment and runs the emailer.py script to send out dog pictures every hour.
API Used
Dog pictures are fetched from the following API.
Planned Improvements
- Open up email list to public
- Create workflow to add email from pull request to email list.
Contributing
If you can help with any of the tasks in the Planned Improvements section (they are also open issues) feel free to make a pull request with your code.
Set up
Google Set up
-
Go to the following link to set up an app password for your google account.
-
Set email address and password generated for third-party app as environment variables.
$ export EMAIL_USER=<Your email id> $ export EMAIL_PASSWORD=<Generated password>
You may have to set up 2FA if you have not already (Two factor authentication is highly recommended. Not everyone on the Internet wants to send you dog pictures every hour, some people want your bank details).
Repository Set up
-
Clone the repository
$ git clone https://github.com/tintindas/python-emailer.git
-
Navigate into directory
$ cd python-emailer
-
Set up Python virtual environment
$ python3 -m venv .venv
.venv is what I usually name my virtual environment folder.
-
Activate environment
$ source .venv/bin/activate
-
Install dependencies
$ pip install -r requirements.txt
-
Edit email list
Edit the line below. Reset the array with your email addresses.
-
Run script
$ python emailer.py