#!/usr/bin/env python



"""

Send Gmail from Python

"""



import smtplib #for sending e-mail

from email.mime.text import MIMEText #for creating e-mail



GMAIL_USER = 'my_awesome_name@gmail.com'

GMAIL_PASS = 'my_super-secure_password'



message = MIMEText('really important stuff here')

message['subject'] = "Python can send Gmail!"

message['from'] = GMAIL_USER



gmail = smtplib.SMTP('smtp.gmail.com', 587)

gmail.ehlo()

gmail.starttls()

gmail.ehlo()

gmail.login(GMAIL_USER, GMAIL_PASS)



gmail.sendmail(GMAIL_USER, 'recipient@example.com', message.as_string())

comments powered by Disqus
TitleTime
Ultra Apex Diet23 minutes
ব্লগ4==https://ga...42 minutes
66-GAgi=https://gametvpcl...45 minutes
kaisa/https://gametvpcliv...1 hour
kaisa/https://gametvpcliv...1 hour
kaisa/https://gametvpcliv...1 hour
Texy*https://vsfootballiv...2 hours

© Paste4BTC 2014 - Earn bitcoins by pasting! | My pastes | Popular pastes | New pastes | Payments | FAQ | Terms of Service | Pastes uploaded: 713 999 | Total hits: 73 915 991