Socket
Socket
Sign inDemoInstall

python-gmail

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    python-gmail

Automatically Send Gmail with SMTP Server.


Maintainers
1

Readme

Build Status GitHub license PyPI - Python Version PyPI - Wheel PyPI

Downloads

Package Installation :

pip install python-gmail

Package Link

python-gmail :

Inorder to send mail form gmail using SMTP Server, first you need to enable "Two-Step Verification" on the sender mail id.

Google Account Help

  1. Open your Google Account .
2. In the navigation panel, select Security.

3. Under “Signing in to Google,” select 2-Step Verification and then Get started.

4. Set any "Account PIN". This pin will be the passowad of the sender mail is.

How to use the module :

E-mail login credential :

gmail_id = ('') #sender g-mail id

gmail_password = ('') #sender g-mail password

Single destination mail id :

destination_addresses = [
                    'reciver_mail_id_1@gmail.com'
                    ]

Multiple destination mail id's :

destination_addresses = [
                    'reciver_mail_id_1@gmail.com',
                    'reciver_mail_id_2@gmail.com',
                    'reciver_mail_id_3@gmail.com',
                    '............................',
                    '.............................',
                    'reciver_mail_id_N number@gmail.com',
                    ]

main subject :

subject = ('') #mail subject

mail message :

message = ('') #mail message

How to import the module :

from gmail.gmail import gmail

create mail object :

mail = gmail()

give sender login credential :

mail.login(gmail_id, gmail_password)

give reciver mail id or id's. :

mail.receiver_mail(destination_addresses)

send mail :

mail.send_mail(subject, message)

Example :

from gmail.gmail import gmail

mail = gmail()

mail.login(gmail_id, gmail_password)

mail.receiver_mail(destination_addresses)

mail.send_mail(subject, message)

License :

MIT Licensed

Author :

Sujit Mandal

GitHub

PyPi

LinkedIn

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc