Login

Tag "smtp"

Snippet List

One line SMTP sink server

Start simple SMTP server on localhost:25 and print to standard output all email headers and the email body. Useful for debugging outgoing mail without configuring SMTP daemon in development enviroment.

  • email
  • debug
  • smtp
  • mail
  • debugging
  • debuggingserver
Read More

SMTP sink server: prettier output

A modified version of the original SMTP sink server: [http://www.djangosnippets.org/snippets/96/](http://www.djangosnippets.org/snippets/96/). I've added some nicer, more verbose terminal messages.

  • email
  • debug
  • smtp
  • server
  • eml
Read More

FixedEmailMessage

Django EmailMessage class has no cc support and has bug in bcc support. Core developers won't add cc support (see ticket http://code.djangoproject.com/ticket/5790), and I don't want to wait half a year until they will realize they have a flaw that bcc recipients are sent to regular "to:" recipients and fix it. So, if you want to use EmailMessage class right now, you'd better use FixedEmailMessage class. Class contract is the same, except for a new cc constructor argument.

  • email
  • smtp
  • mail
  • message
  • emailmessage
  • cc
Read More

SMTP sink server

In development, we need a SMTP Server to see the results of send mail via SMTP protocol in Python application. Instead of configure a mail daemon, we could use this little script to receive the SMTP request, and save each session into an EML file. *.eml could be viewed with your favorite email client, you need not send them out. [EML description](http://filext.com/detaillist.php?extdetail=EML) **Update**: Fix bug for overwrite files when received multi-message in one SMTP session.

  • email
  • debug
  • smtp
  • server
  • eml
Read More

4 snippets posted so far.