Automatically Send Gmail with SMTP Server.
Project description
Package Installation :
pip install python-gmail
python-gmail :
Inorder to send mail form gmail using SMTP Server, first you need to enable "Two-Step Verification" on the sender mail id.
- 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
password = ('') #sender g-mail password
Single Reciver mail id :
reciver_mail_id = [
'reciver_mail_id_1@gmail.com'
]
Multiple Reciver mail id's :
reciver_mail_id = [
'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 contain :
mail_contain = ('') #mail contain
How to import the module :
from gmail.gmail import gmail
create mail object :
mail = gmail()
give sender login credential :
mail.login(gmail_id, password)
give reciver mail id or id's. :
mail.reciver_mail(reciver)
send mail :
mail.send_mail(subject, mail_contain)
Example :
from gmail.gmail import gmail
mail = gmail()
mail.login(gmail_id, password)
mail.reciver_mail(reciver)
mail.send_mail(subject, mail_contain)
License :
MIT Licensed
Author :
Sujit Mandal
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
python-gmail-0.0.5.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for python_gmail-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e59350b4819c782fb83ca65cfea8eca3c5a69da8485b0bf32de06573984eb96d |
|
MD5 | 366773712757ccc26a3d81c735ed2d96 |
|
BLAKE2b-256 | 98f443caec94907e868acfa4d97fb1fdc8db5265373e9e5988a230d6792edc56 |