Latest recipes tagged "smtp"http://code.activestate.com/recipes/tags/smtp/new/2014-01-10T20:13:45-08:00ActiveState Code RecipesSending Email From A Python Program (Python)
2014-01-10T20:13:45-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578807-sending-email-from-a-python-program/
<p style="color: grey">
Python
recipe 578807
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/email/">email</a>, <a href="/recipes/tags/smtp/">smtp</a>, <a href="/recipes/tags/time/">time</a>).
Revision 4.
</p>
<p>I put together this code for one of my programs and decided to share it. You may never know when you will need you Python Program to send an email to someone. <a href="http://thelivingpearl.com/2014/01/10/sending-email-from-python-using-command-line/">Sending Email From Python</a>. </p>
<p>NOTE: You will have to change the account setup variables to your own. The server is currently configured o Gmail, but you can use this script with any server. </p>
Sending Email in Python (Python)
2013-02-24T13:47:01-08:00James Millshttp://code.activestate.com/recipes/users/4167757/http://code.activestate.com/recipes/578472-sending-email-in-python/
<p style="color: grey">
Python
recipe 578472
by <a href="/recipes/users/4167757/">James Mills</a>
(<a href="/recipes/tags/email/">email</a>, <a href="/recipes/tags/email_sending/">email_sending</a>, <a href="/recipes/tags/sendmail/">sendmail</a>, <a href="/recipes/tags/smtp/">smtp</a>).
</p>
<p>Every Python Application needs to send email at some point. Whether it's for reporting errors, status updates or simply the core functionality of the system this little recipe should help! Documented and Tested.</p>
Sending non-ASCII emails from Python 3 (Python)
2012-09-16T07:50:17-07:00Krystian Rosińskihttp://code.activestate.com/recipes/users/4182314/http://code.activestate.com/recipes/578150-sending-non-ascii-emails-from-python-3/
<p style="color: grey">
Python
recipe 578150
by <a href="/recipes/users/4182314/">Krystian Rosiński</a>
(<a href="/recipes/tags/email/">email</a>, <a href="/recipes/tags/python3/">python3</a>, <a href="/recipes/tags/smtp/">smtp</a>).
Revision 17.
</p>
<p>Simple Python 3 module for sending emails with attachments through an SMTP server.</p>
<p>The module supports non-ASCII characters in sender name, subject, message and file names.</p>
Python Gmail script (smtp) (Python)
2011-06-08T20:15:01-07:00jrovegnohttp://code.activestate.com/recipes/users/4170207/http://code.activestate.com/recipes/577690-python-gmail-script-smtp/
<p style="color: grey">
Python
recipe 577690
by <a href="/recipes/users/4170207/">jrovegno</a>
(<a href="/recipes/tags/gmail/">gmail</a>, <a href="/recipes/tags/smtp/">smtp</a>).
Revision 4.
</p>
<p>Referencias:
<a href="http://ideaschile.wordpress.com/2011/05/12/python-gmail-script-smtp/">Python Gmail script (smtp)</a></p>
Multi threaded SMTP proxy (Python)
2010-06-12T22:27:00-07:00Lobsanghttp://code.activestate.com/recipes/users/4174176/http://code.activestate.com/recipes/577260-multi-threaded-smtp-proxy/
<p style="color: grey">
Python
recipe 577260
by <a href="/recipes/users/4174176/">Lobsang</a>
(<a href="/recipes/tags/mail/">mail</a>, <a href="/recipes/tags/proxy/">proxy</a>, <a href="/recipes/tags/smtp/">smtp</a>).
Revision 2.
</p>
<p>This smtp proxy can be used to process any part of the message (header and body). It is also possible to process all the body part just before it is send to the MTA.</p>
<p>The aim of this proxy is to allow a modification of the message on the fly. It had been tested with the postfix <a href="http://www.postfix.org/SMTPD_PROXY_README.html">before queue content filter</a></p>
send a multipart email (Python)
2009-10-15T13:56:10-07:00Trent Mickhttp://code.activestate.com/recipes/users/4173505/http://code.activestate.com/recipes/576931-send-a-multipart-email/
<p style="color: grey">
Python
recipe 576931
by <a href="/recipes/users/4173505/">Trent Mick</a>
(<a href="/recipes/tags/email/">email</a>, <a href="/recipes/tags/multipart/">multipart</a>, <a href="/recipes/tags/smtp/">smtp</a>).
Revision 2.
</p>
<p>A simple function to send an email (can specify text and html parts).</p>
<p>See also: <a href="http://code.activestate.com/recipes/576824/">Recipe 576824</a> (send via Gmail's SMTP server), <a href="http://code.activestate.com/recipes/576858/">Recipe 576858</a> (more complex, but supports attachments).</p>
Send HTML or Text email with or without attachments (Python)
2009-07-27T13:14:24-07:00Isaac Wagnerhttp://code.activestate.com/recipes/users/4171255/http://code.activestate.com/recipes/576858-send-html-or-text-email-with-or-without-attachment/
<p style="color: grey">
Python
recipe 576858
by <a href="/recipes/users/4171255/">Isaac Wagner</a>
(<a href="/recipes/tags/email/">email</a>, <a href="/recipes/tags/smtp/">smtp</a>).
</p>
<p>Using code gleaned from the net and from my own brain I created this convenient wrapper to send email messages via SMTP in Python. This class allows you to send plain text email messages or HTML encoded messages. You can also add attachments to the messages.</p>
send a multipart email via gmail's SMTP server (Python)
2009-12-21T14:29:41-08:00Trent Mickhttp://code.activestate.com/recipes/users/4173505/http://code.activestate.com/recipes/576824-send-a-multipart-email-via-gmails-smtp-server/
<p style="color: grey">
Python
recipe 576824
by <a href="/recipes/users/4173505/">Trent Mick</a>
(<a href="/recipes/tags/email/">email</a>, <a href="/recipes/tags/gmail/">gmail</a>, <a href="/recipes/tags/smtp/">smtp</a>).
Revision 3.
</p>
<p>This is a Python function to send an email (a) with optional text and html alternative parts and (b) via gmail's SMTP server using your gmail account.</p>