This is a small program that sends a file as the body of an encrypted email.
-
Download and install Python3.
-
Clone or download this repository.
-
Navigate to the folder and install the dependencies:
pip3 install -r requirements.txtor
py -m pip install -r requirements.txt -
Rename
example-config.ymltoconfig.yml. Edit it to include your details:- Put your email address and password under
senderandpassword. This is the address from which emails will be sent. - Under
sender-keyandpassphrase, put your public key fingerprint and its passphrase.- You can determine the fingerprint of a key by running
$ gpg --fingerprint, which lists all keys with their fingerprints, or$ gpg --fingerprint [email address]to view the fingerprint of the key associated with an email address.
- You can determine the fingerprint of a key by running
- Put the recipient's email address and their public key fingerprint under
recipientandrecipient-key. - Under
gnupg, put the path to your gpg binary. You can determine this by running$ which gpg. - Under
gpg-home,keyring, andsecring, enter your gpg home directory, public keyring, and secret keyring.- Run
$ gpg --list-keys. The output will be something like/path/to/pubring.gpg. In this example,pubring.gpgis your public keyring, and the rest of the path is your gpg home directory. - Similarly, to find the name of your secret keyring, run
$ gpg --list-secret-keys. The output will be of the form/path/to/secring.gpg. Here,secring.gpgis the name of your secret keyring.
- Run
- Under
smtp_serverandsmtp_port, put your email provider's SMTP server and port.
- Put your email address and password under
-
Run
file-emailer.py.python3 file-emailer.py /path/to/fileor
py file-emailer.py /path/to/file
Run
python3 file-emailer.py /path/to/file
or
py file-emailer.py /path/to/file
where file is the one you want to send.
-
Change email subject to filename - Make subject optional
- Add support for multiple files
- Add support for multiple recipients
- Make recipient(s) a command-line argument?
- Create version without PGP
- Please submit issues and feature requests here.
- Pull requests are welcome.
- For queries and more information, feel free to email me.
file-emailer is licensed under the GPLv3. For more details, see LICENSE.
Copyright (C) 2018 Abitha K Thyagarajan
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.