Python module to, send SMS, emails and read unread emails.
Project description
Gmail Connector
Python module to, send SMS, emails and read unread
emails in inbox
folder.
Uses the default python modules:
email
- Format emails asMIMEMultipart
object, read emails frombytes
andstr
and decode headers.smtplib
-SMTP
Simple Mail Transfer Protocol to connect togmail
server, doauth
and perform outgoing tasks.imaplib
-IMAP
Internet Message Access Protocol to access messages in an email mailbox.datetime
- Usesdatetime
module to skim the date and time when the email arrived.
Pypi Module
https://pypi.org/project/gmail-connector/
Usage
pip install gmail-connector
from gmailconnector.send_sms import Messenger
messenger = Messenger(
gmail_user='username@gmail.com',
gmail_pass='<ACCOUNT_PASSWORD>',
phone_number='+11234567890',
message='Test SMS using gmail-connector'
)
print(messenger.send_sms())
from pathlib import PurePath
from gmailconnector.send_email import SendEmail
email_obj = SendEmail(
gmail_user='username@gmail.com',
gmail_pass='<ACCOUNT_PASSWORD>',
recipient='another_username@gmail.com',
subject='Howdy!',
attachment=PurePath(__file__).name, # filename of the attachment
body='Attached is the code that generated this very email',
sender=None
)
print(email_obj.send_email())
from gmailconnector.read_email import ReadEmail
ReadEmail(
gmail_user='username@gmail.com',
gmail_pass='<ACCOUNT_PASSWORD>'
).read_email()
Pre-Commit
Install pre-commit
to run flake8
and isort
for linting and sphinx
for documentation generator.
pip3 install pre-commit==2.13.0 Sphinx==4.1.1
pre-commit run --all-files
Runbook
https://thevickypedia.github.io/gmail-connector/
License & copyright
© Vignesh Sivanandha Rao, Gmail Connector
Licensed under the MIT License
Change Log
0.0.14 (07/18/2021)
- Delete broken releases
- Modify and update CHANGELOG
- Change URL for HomePage
0.0.15 (07/18/2021)
- Update project description and README.md
0.0.16 (07/19/2021)
- Add module usage in description
- Fix broken hyperlinks in README.md
- Setup github actions for pypi publish
0.0.17 (07/19/2021)
- Bump version.
- Supports github action to auto upload to pypi.
0.0.18 (07/19/2021)
- Add logger module.
- Remove print statements.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gmail-connector-0.0.18.tar.gz
(8.4 kB
view hashes)
Built Distribution
Close
Hashes for gmail_connector-0.0.18-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9e49785c65a76beab4150222c8000447e88c0ac8801fe8ffc3f3e54a9e8c6bc |
|
MD5 | 8c6d8bd9c38f1b717575b436e39006ad |
|
BLAKE2b-256 | 87e08299fb866717c8df2c9d4f4258d809e56226c84e2802ea7e9b598dfb4aa6 |