Send email from command line
$ git clone https://github.com/nautiyaldeepak/emailpy.git
$ pip3 install -r requirements.txt
$ python3 setup.py install
$ emailpy --from senderemail@outlook.com --passwd SenderEmailPassword --to receiveremail@gmail.com --subject "My subject" --message "My message" --attach myattachmentfile
$ emailpy --from senderemail@outlook.com --passwd SenderEmailPassword --to receiveremail@gmail.com --subject "My subject" --message "My message"
Sending email without attachments
$ emailpy --from senderemail@outlook.com --passwd SenderEmailPassword --to receiveremail@gmail.com
Sending a naked email
$ emailpy --from senderemail@outlook.com --passwd SenderEmailPassword --to receiveremail@gmail.com --subject "My subject" --message "My message" --attach mya\
ttachmentfile
Sending email with message, subject & attachments
If you are using Gmail for sending the otp then there is 1 extra step. You will first has reduce the security of the Gmail Account. To reduce the security of your Gmail account go to the link: https://myaccount.google.com/lesssecureapps The lessSecureAppUse Feature should be "ON".
Do you want to make this better? Open an issue and/or a PR on Github. Thanks!
MIT License
Copyright (c) 2018 Deepak Nautiyal