Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
[PY] Repeatedly send e-mails
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Brackson" data-source="post: 254064" data-attributes="member: 34747"><p>This may be gravedigging, but here's a version that's compatible with 2.7.6.</p><p></p><p>[PHP]import smtplib, getpass</p><p></p><p>email = raw_input("email>")</p><p>pwd = getpass.getpass("pwd>")</p><p></p><p>#connection to gmail</p><p>o = smtplib.SMTP("smtp.gmail.com:587")</p><p>o.starttls()</p><p>o.login(email, pwd)</p><p></p><p>print("--" * 40)</p><p></p><p>msg = raw_input("msg>")</p><p>target_email = raw_input("target e-mail>")</p><p></p><p>#send the message until the program crashes</p><p>while True:</p><p> o.sendmail(email, target_email, msg)</p><p> print()</p><p> print("Message sent.")[/PHP]</p><p></p><p>I can also confirm that this works.</p></blockquote><p></p>
[QUOTE="Brackson, post: 254064, member: 34747"] This may be gravedigging, but here's a version that's compatible with 2.7.6. [PHP]import smtplib, getpass email = raw_input("email>") pwd = getpass.getpass("pwd>") #connection to gmail o = smtplib.SMTP("smtp.gmail.com:587") o.starttls() o.login(email, pwd) print("--" * 40) msg = raw_input("msg>") target_email = raw_input("target e-mail>") #send the message until the program crashes while True: o.sendmail(email, target_email, msg) print() print("Message sent.")[/PHP] I can also confirm that this works. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
[PY] Repeatedly send e-mails
Top