Popular recipes tagged "email" but not "smtp"http://code.activestate.com/recipes/tags/email-smtp/2016-05-27T05:28:21-07:00ActiveState Code RecipesShutdown your computer via E-mail - Python (Python) 2016-05-27T05:28:21-07:00Burak Tandoganhttp://code.activestate.com/recipes/users/4191373/http://code.activestate.com/recipes/580668-shutdown-your-computer-via-e-mail-python/ <p style="color: grey"> Python recipe 580668 by <a href="/recipes/users/4191373/">Burak Tandogan</a> (<a href="/recipes/tags/computer/">computer</a>, <a href="/recipes/tags/email/">email</a>, <a href="/recipes/tags/mail/">mail</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/script/">script</a>, <a href="/recipes/tags/shutdown/">shutdown</a>). Revision 2. </p> <p>Shutdown your computer via E-mail.</p> <p>Basically, send an e-mail to your e-mail address SHUTDOWN YOURSELF {YEAR-MONTH-DATE} format in Subject. Your mail's SUBJECT must be in SHUTDOWN YOURSELF {YEAR-MONTH-DATE} format.</p> handling embedded email images in python (Python) 2012-03-02T12:43:51-08:00Gregory Nicholashttp://code.activestate.com/recipes/users/4180332/http://code.activestate.com/recipes/578058-handling-embedded-email-images-in-python/ <p style="color: grey"> Python recipe 578058 by <a href="/recipes/users/4180332/">Gregory Nicholas</a> (<a href="/recipes/tags/appengine/">appengine</a>, <a href="/recipes/tags/email/">email</a>, <a href="/recipes/tags/embedded_image/">embedded_image</a>, <a href="/recipes/tags/python/">python</a>). </p> <p>this code finds all embedded images in the email and replaces them with an appropriate img tag.</p> handling embedded email images in python (Python) 2011-10-26T15:31:45-07:00Simeon Shpizhttp://code.activestate.com/recipes/users/4178609/http://code.activestate.com/recipes/577923-handling-embedded-email-images-in-python/ <p style="color: grey"> Python recipe 577923 by <a href="/recipes/users/4178609/">Simeon Shpiz</a> (<a href="/recipes/tags/appengine/">appengine</a>, <a href="/recipes/tags/email/">email</a>, <a href="/recipes/tags/embedded_image/">embedded_image</a>, <a href="/recipes/tags/python/">python</a>). Revision 2. </p> <p>this code finds all embedded images in the email and replaces them with an appropriate img tag.</p> working with an email's headers (Python) 2010-03-19T09:32:05-07:00Shamil Bikineyevhttp://code.activestate.com/recipes/users/4173185/http://code.activestate.com/recipes/577128-working-with-an-emails-headers/ <p style="color: grey"> Python recipe 577128 by <a href="/recipes/users/4173185/">Shamil Bikineyev</a> (<a href="/recipes/tags/email/">email</a>, <a href="/recipes/tags/header/">header</a>). </p> <p>email utils (decode_header, get_header, parseaddr, formataddr) that useful while working with an email's parts</p> retrieving emails from POP3 server (Python) 2010-03-19T09:18:45-07:00Shamil Bikineyevhttp://code.activestate.com/recipes/users/4173185/http://code.activestate.com/recipes/577127-retrieving-emails-from-pop3-server/ <p style="color: grey"> Python recipe 577127 by <a href="/recipes/users/4173185/">Shamil Bikineyev</a> (<a href="/recipes/tags/email/">email</a>). </p> <p>poplib utils (retr_text, retr_msg, ..) that useful while working with POP3 server</p> Delete all message older than a given date in a pop account (Python) 2009-10-05T12:56:13-07:00Benjamin Sergeanthttp://code.activestate.com/recipes/users/4039626/http://code.activestate.com/recipes/576922-delete-all-message-older-than-a-given-date-in-a-po/ <p style="color: grey"> Python recipe 576922 by <a href="/recipes/users/4039626/">Benjamin Sergeant</a> (<a href="/recipes/tags/delete/">delete</a>, <a href="/recipes/tags/email/">email</a>, <a href="/recipes/tags/pop/">pop</a>). </p> <p>I was using the keep option in fetchmail, so I had a huge number of emails that seems to slow down mails retrieval / pop connection. I wanted a way to </p> Convert text/enriched MIME to text/html (Python) 2009-06-09T15:08:40-07:00Jack Trainorhttp://code.activestate.com/recipes/users/4076953/http://code.activestate.com/recipes/576800-convert-textenriched-mime-to-texthtml/ <p style="color: grey"> Python recipe 576800 by <a href="/recipes/users/4076953/">Jack Trainor</a> (<a href="/recipes/tags/email/">email</a>, <a href="/recipes/tags/html/">html</a>, <a href="/recipes/tags/mime/">mime</a>, <a href="/recipes/tags/text_enriched/">text_enriched</a>). </p> <p>Converts text stream in text/enriched MIME format from file or stdin to text/html output to file or stdout.</p> Send Email (Python) 2012-08-26T11:23:54-07:00sfwgeekhttp://code.activestate.com/recipes/users/4170734/http://code.activestate.com/recipes/576807-send-email/ <p style="color: grey"> Python recipe 576807 by <a href="/recipes/users/4170734/">sfwgeek</a> (<a href="/recipes/tags/argparse/">argparse</a>, <a href="/recipes/tags/cli/">cli</a>, <a href="/recipes/tags/command/">command</a>, <a href="/recipes/tags/email/">email</a>, <a href="/recipes/tags/interface/">interface</a>, <a href="/recipes/tags/line/">line</a>, <a href="/recipes/tags/mail/">mail</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/send/">send</a>, <a href="/recipes/tags/smtplib/">smtplib</a>). Revision 5. </p> <p>A Command Line Interface (CLI) program to send email.</p> Detach Thunderbird emails and keep links (Python) 2009-05-11T02:38:47-07:00Jice Clavierhttp://code.activestate.com/recipes/users/4089467/http://code.activestate.com/recipes/576749-detach-thunderbird-emails-and-keep-links/ <p style="color: grey"> Python recipe 576749 by <a href="/recipes/users/4089467/">Jice Clavier</a> (<a href="/recipes/tags/detach/">detach</a>, <a href="/recipes/tags/email/">email</a>, <a href="/recipes/tags/thunderbird/">thunderbird</a>). </p> <p>For some people, thunderbird lacks of a powerfull automatic detach function that keeps the link to the detached file from the mail itself (like Eudora has). Some plugins exists but there is now way to detach a document and replace it with a link to it's new location. For security reasons, the developper team doesn't want to allow the opening of a local file from thunderbird. When you have to keep large history of your emails, this may become a real problem for the size of your box and the facilities to automate some tasks on files (you can't use programs to see if you have doubles and so on). If, like me, you want to keep your email box as slim as possible by detaching attached documents and keep links to the detached files, this may be for you.</p> <p>The trick is that the file is detached and replaced by an html one in which you'll find the link to the file. The html file will be opened in your browser where the link to your local filesystem will operate.</p> extract emails from a mbox read on stdin (Python) 2013-09-07T10:24:17-07:00Romain Dartigueshttp://code.activestate.com/recipes/users/4167472/http://code.activestate.com/recipes/576553-extract-emails-from-a-mbox-read-on-stdin/ <p style="color: grey"> Python recipe 576553 by <a href="/recipes/users/4167472/">Romain Dartigues</a> (<a href="/recipes/tags/email/">email</a>, <a href="/recipes/tags/generators/">generators</a>, <a href="/recipes/tags/mbox/">mbox</a>, <a href="/recipes/tags/read_only/">read_only</a>, <a href="/recipes/tags/stdin/">stdin</a>). Revision 2. </p> <p>The Python <code>mailbox.mbox</code> class require a real file to initialize, which was an issue in my case. These simple functions let you iter through a mailbox read from a read-only file descriptor (like <code>sys.stdin</code>).</p> <p>This script use the generators which were introduced in Python-2.2. Let me know if you are interested a similar functionnality on older Python versions.</p>