{"id":1294,"date":"2009-12-03T09:49:29","date_gmt":"2009-12-03T08:49:29","guid":{"rendered":"http:\/\/www.jurecuhalev.com\/blog\/?p=1294"},"modified":"2009-12-02T17:53:54","modified_gmt":"2009-12-02T16:53:54","slug":"python-smtp-sink-server","status":"publish","type":"post","link":"https:\/\/www.jurecuhalev.com\/blog\/python-smtp-sink-server\/","title":{"rendered":"Python SMTP sink server"},"content":{"rendered":"<p>Debugging email sending in your Web application is always tricky as you need a working SMTP and you also need to watch out that you don&#8217;t accidently spam real users (if you&#8217;re working on a local copy of real database).<\/p>\n<p>There is a neat one liner that acts as a &#8220;sink smtpd&#8221; server, meaning that it implements SMTP protocol, so you app can communicate with it, while printing everything it receives on screen:<\/p>\n<blockquote><p>sudo \/usr\/lib\/python2.6\/smtpd.py -n -c DebuggingServer localhost:25<\/p><\/blockquote>\n<p>(<a href=\"http:\/\/www.djangosnippets.org\/snippets\/96\/\">via Django Snippets<\/a>)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Debugging email sending in your Web application is always tricky as you need a working SMTP and you also need to watch out that you don&#8217;t accidently spam real users (if you&#8217;re working on a local copy of real database). There is a neat one liner that acts as a &#8220;sink smtpd&#8221; server, meaning that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[12,14],"tags":[930,932,829,830],"class_list":["post-1294","post","type-post","status-publish","format-standard","hentry","category-django","category-tech","tag-django","tag-python","tag-smtp","tag-snippet"],"acf":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jurecuhalev.com\/blog\/wp-json\/wp\/v2\/posts\/1294","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jurecuhalev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jurecuhalev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jurecuhalev.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jurecuhalev.com\/blog\/wp-json\/wp\/v2\/comments?post=1294"}],"version-history":[{"count":2,"href":"https:\/\/www.jurecuhalev.com\/blog\/wp-json\/wp\/v2\/posts\/1294\/revisions"}],"predecessor-version":[{"id":1296,"href":"https:\/\/www.jurecuhalev.com\/blog\/wp-json\/wp\/v2\/posts\/1294\/revisions\/1296"}],"wp:attachment":[{"href":"https:\/\/www.jurecuhalev.com\/blog\/wp-json\/wp\/v2\/media?parent=1294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jurecuhalev.com\/blog\/wp-json\/wp\/v2\/categories?post=1294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jurecuhalev.com\/blog\/wp-json\/wp\/v2\/tags?post=1294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}