Skip to main content

Python script to, send SMS, emails and read unread emails.

Project description

Gmail Connector

Pypi Module

https://pypi.org/project/gmail-connector/

Usage

pip install gmail-connector


Send SMS

from os import environ
from gmailconnector.send_sms import Messenger

# noinspection PyTypeChecker
messenger = Messenger(
    gmail_user=environ.get('gmail_user'),
    gmail_pass=environ.get('gmail_pass'),
    phone_number=environ.get('phone'),
    message=f'Test SMS using gmail-connector'
)
print(messenger.send_sms())

Send Email

from os import environ
from pathlib import PurePath
from gmailconnector.send_email import SendEmail

email_obj = SendEmail(
        gmail_user=environ.get('gmail_user'),
        gmail_pass=environ.get('gmail_pass'),
        recipient=environ.get('recipient'),
        subject='Howdy!',
        attachment=PurePath(__file__).name,
        body='Attached is the code that generated this very email',
        sender=None
    )
print(email_obj.send_email())

Read Email

from os import environ
from gmailconnector.read_email import ReadEmail

ReadEmail(
    gmail_user=environ.get('gmail_user'),
    gmail_pass=environ.get('gmail_pass')
).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 Reader

Licensed under the MIT License

Change Log

0.0.14 (07/18/2021)

  • Delete broken releases
  • Modify and update CHANGELOG
  • Change URL for HomePage

Project details


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.14.tar.gz (11.4 kB view hashes)

Uploaded Source

Built Distribution

gmail_connector-0.0.14-py2.py3-none-any.whl (8.3 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page