Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

The minimum you should know about email as a de...

The minimum you should know about email as a developer.

Talk given at Refresh Glasgow [http://refreshglasgow.org/]

Email isn't something we pay much attention to as developers. We'll have hairpulling catfights over text editors, wax lyrical about our choice of framework, endlessly tweak our web-server configurations to get just a few more requests/second out of them, but email? It just works, right? We don't need to think about email.

Wrong.

Email is everywhere, email is in everything and the chances are you're doing it wrong. We cover the very least you should be doing to ensure your application's email is getting to its target, how to talk to ESPs and some common mistakes to avoid for developers, designers and copywriters.

Gavin Montague

February 20, 2013
Tweet

Other Decks in Programming

Transcript

  1. THE BARE MINIMUM YOU, AS A DEVELOPER, SHOULD BE DOING

    WHEN YOU WANT ME, A USER, TO BE ABLE TO RECEIVE EMAIL FROM YOUR WEBSITE. Thursday, 21 February 13
  2. Disclaimer: this talk contains no stylesheet or frontend stuff. (Go

    look at the Email Standards Project for that) Thursday, 21 February 13
  3. Disclaimer: this talk contains no stylesheet or frontend stuff. (Go

    look at the Email Standards Project for that) Thursday, 21 February 13
  4. Disclaimer: this talk contains no stylesheet or frontend stuff. (Go

    look at the Email Standards Project for that) Thursday, 21 February 13
  5. IF YOU’RE USING THE “STANDARD” TOOLS A LANGUAGE PROVIDES AND

    NOTHING ELSE FOR SENDING EMAIL, YOU’RE PROBABLY DOING IT WRONG. Thursday, 21 February 13
  6. PREFLIGHT CHECKLIST •Are you on a shared IP address? •Check

    your IP address for previous abuse Thursday, 21 February 13
  7. PREFLIGHT CHECKLIST •Are you on a shared IP address? •Check

    your IP address for previous abuse •Set up postmaster@...., abuse@... Thursday, 21 February 13
  8. PREFLIGHT CHECKLIST •Are you on a shared IP address? •Check

    your IP address for previous abuse •Set up postmaster@...., abuse@... •Make sure your DNS registration details are up to date Thursday, 21 February 13
  9. SETTING UP RDNS Received: from mx4.nyi.mail.srv.osa ([10.202.2.203]) by compute4.internal (LMTPProxy);

    Tue, 19 Feb 201 Received: from nestor.itison.com (nestor.itison.com [31.222.170.118]) by mx4.messagingengine.com (Postfix for <[email protected]>; Tue, 19 Feb 2013 03:24:38 -0500 (EST) Received: from localhost.localdomain (localhost [127.0.0.1]) Thursday, 21 February 13
  10. SETTING UP RDNS Received: from mx4.nyi.mail.srv.osa ([10.202.2.203]) by compute4.internal (LMTPProxy);

    Tue, 19 Feb 201 Received: from nestor.itison.com (nestor.itison.com [31.222.170.118]) by mx4.messagingengine.com (Postfix for <[email protected]>; Tue, 19 Feb 2013 03:24:38 -0500 (EST) Received: from localhost.localdomain (localhost [127.0.0.1]) Thursday, 21 February 13
  11. SENDER POLICY FRAMEWORK (SPF) by mx.google.com with ESMTP id rw7si9680451wjb

    Mon, 11 Feb 2013 02:17:50 -0800 (PST) Received-SPF: pass (google.com: domain of [email protected] designates 31.222.170.188 as permitted sender) client-ip=31.222.170.188; Authentication-Results: mx.google.com; spf=pass (google.com: domain of [email protected] designates 31.222.170.188 as permitted sender) [email protected]; dkim=pass [email protected] Received: from localhost.localdomain (localhost [127.0.0.1]) by ince.itison.com (Postfix) with ESMTP id 044AC228D3 for <[email protected]>; Mon, 11 Feb 2013 10:17:49 +0000 ( Thursday, 21 February 13
  12. SENDER POLICY FRAMEWORK (SPF) by mx.google.com with ESMTP id rw7si9680451wjb

    Mon, 11 Feb 2013 02:17:50 -0800 (PST) Received-SPF: pass (google.com: domain of [email protected] designates 31.222.170.188 as permitted sender) client-ip=31.222.170.188; Authentication-Results: mx.google.com; spf=pass (google.com: domain of [email protected] designates 31.222.170.188 as permitted sender) [email protected]; dkim=pass [email protected] Received: from localhost.localdomain (localhost [127.0.0.1]) by ince.itison.com (Postfix) with ESMTP id 044AC228D3 for <[email protected]>; Mon, 11 Feb 2013 10:17:49 +0000 ( Thursday, 21 February 13
  13. DOMAIN KEYS (DKIM) Received: from localhost.localdomain (localhost [127.0.0.1]) by nestor.itison.com

    (Postfix) with ESMTP id BBD6D20CAE for <[email protected]>; Tue, 19 Feb 2013 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=itison.com; s=nestor; t=1361262270; bh=QaZ2zdOM7wm/2XXqa6uJJgRm2OQqYOgCdjUxGX4WPLo=; h=Date:From:Reply-To:To:Subject:List-Unsubscribe; b=+Gp5sOmfHTkDL26/IliNbgpAGvWaTzzKVboWpAHb3tBPvnKU8O+Gr3JXgl43MlH95 juUg83Ww8xfHNTe4poLAjADyFA9TR1chGcQLFN/GEA+X7Wwbg2X1F9kvTn7idgI0Hf I8Te84VxgZ5vHBuAlbWIWoKTE4MxIoPOJPJJGZxM= Date: Tue, 19 Feb 2013 08:22:44 +0000 From: itison <[email protected]> Thursday, 21 February 13
  14. DOMAIN KEYS (DKIM) Received: from localhost.localdomain (localhost [127.0.0.1]) by nestor.itison.com

    (Postfix) with ESMTP id BBD6D20CAE for <[email protected]>; Tue, 19 Feb 2013 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=itison.com; s=nestor; t=1361262270; bh=QaZ2zdOM7wm/2XXqa6uJJgRm2OQqYOgCdjUxGX4WPLo=; h=Date:From:Reply-To:To:Subject:List-Unsubscribe; b=+Gp5sOmfHTkDL26/IliNbgpAGvWaTzzKVboWpAHb3tBPvnKU8O+Gr3JXgl43MlH95 juUg83Ww8xfHNTe4poLAjADyFA9TR1chGcQLFN/GEA+X7Wwbg2X1F9kvTn7idgI0Hf I8Te84VxgZ5vHBuAlbWIWoKTE4MxIoPOJPJJGZxM= Date: Tue, 19 Feb 2013 08:22:44 +0000 From: itison <[email protected]> Thursday, 21 February 13
  15. CAN-SPAM (US) • Don’t use fraudulent channels/tools • Don’t obscure

    sender identity • Include physical postal address Thursday, 21 February 13
  16. CAN-SPAM (US) • Don’t use fraudulent channels/tools • Don’t obscure

    sender identity • Include physical postal address • Indicate if message is advertisement Thursday, 21 February 13
  17. CAN-SPAM (US) • Don’t use fraudulent channels/tools • Don’t obscure

    sender identity • Include physical postal address • Indicate if message is advertisement • Include a conspicuous unsubscribe method Thursday, 21 February 13
  18. CAN-SPAM (US) • Don’t use fraudulent channels/tools • Don’t obscure

    sender identity • Include physical postal address • Indicate if message is advertisement • Include a conspicuous unsubscribe method • Process all unsubscribe requests in < 10 days Thursday, 21 February 13
  19. CAN-SPAM (US) • Don’t use fraudulent channels/tools • Don’t obscure

    sender identity • Include physical postal address • Indicate if message is advertisement • Include a conspicuous unsubscribe method • Process all unsubscribe requests in < 10 days • As an agent/source you share responsibility Thursday, 21 February 13
  20. CAN-SPAM (US) • Don’t use fraudulent channels/tools • Don’t obscure

    sender identity • Include physical postal address • Indicate if message is advertisement • Include a conspicuous unsubscribe method • Process all unsubscribe requests in < 10 days • As an agent/source you share responsibility • Any message sent to a “harvested” address is spam. Thursday, 21 February 13
  21. E.C. (EC Directive) Regulations 2002 • No, the last slide

    was all bullet points • This isn’t a lecture. • You’re not a lecturer, Gavin • I refuse to contain two slides of bullet points back- to-back • This isn’t what I want to be. • I wanted to be one of those fun presentations with photos of lolcats. :( Thursday, 21 February 13
  22. “OPERATIONALLY, WE DEFINE SPAM AS WHATEVER CONSUMERS DON’T WANT IN

    THEIR INBOX.” MILES LIBBEY ANTI-SPAM, YAHOO Thursday, 21 February 13
  23. “I DON’T CARE IF THEY’VE TRIPLE OPTED- IN AND GIVEN

    YOU THEIR CREDIT CARD NUMBER. RELEVANCE RULES, AND CATERING TO END USER PREFERENCES IS TOP PRIORITY.” CHARLES STILES POSTMASTER, AOL Thursday, 21 February 13
  24. SET UP LIST UNSUBSCRIBE HEADERS Message-Id: <[email protected]> Subject: Please confirm

    your email address with itison Mime-Version: 1.0 Content-Type: multipart/alternative;..... List-Unsubscribe: <mailto:list- [email protected]? subject=unsub_bd49512629e636b9e5b6fe8931_1242916860> <http://www.itison.com/list_manager/ bd49512629e636b9e5b6fe8931_1242916860> Thursday, 21 February 13
  25. WHAT’S YOUR SPAM SCORE? X-Sieve: CMU Sieve 2.4 X-Spam-score: 0.0

    X-Spam-hits: BAYES_00 -1.9, HTML_IMAGE_RATIO_06 0.001, HTML_MESSAGE 0.001, RCVD_IN_RP_CERTIFIED -3, RCVD_IN_RP_SAFE -2, RP_MATCHES_RCVD -0.001, URI_NOVOWEL 0.5, LANGUAGES unknown, BAYES_USED global, SA_VERSION 3.3.1 X-Spam-source: IP='31.222.170.118', Host='nestor.itison.com', Country='GB', FromHeader='com', MailFrom='com' X-Spam-charsets: plain='utf-8', html='utf-8' Thursday, 21 February 13
  26. WHAT’S YOUR SPAM SCORE? X-Sieve: CMU Sieve 2.4 X-Spam-score: 0.0

    X-Spam-hits: BAYES_00 -1.9, HTML_IMAGE_RATIO_06 0.001, HTML_MESSAGE 0.001, RCVD_IN_RP_CERTIFIED -3, RCVD_IN_RP_SAFE -2, RP_MATCHES_RCVD -0.001, URI_NOVOWEL 0.5, LANGUAGES unknown, BAYES_USED global, SA_VERSION 3.3.1 X-Spam-source: IP='31.222.170.118', Host='nestor.itison.com', Country='GB', FromHeader='com', MailFrom='com' X-Spam-charsets: plain='utf-8', html='utf-8' Thursday, 21 February 13
  27. WHAT’S YOUR SPAM SCORE? Subject almost says No prescription X-Sieve:

    CMU Sieve 2.4 X-Spam-score: 0.0 X-Spam-hits: BAYES_00 -1.9, HTML_IMAGE_RATIO_06 0.001, HTML_MESSAGE 0.001, RCVD_IN_RP_CERTIFIED -3, RCVD_IN_RP_SAFE -2, RP_MATCHES_RCVD -0.001, URI_NOVOWEL 0.5, LANGUAGES unknown, BAYES_USED global, SA_VERSION 3.3.1 X-Spam-source: IP='31.222.170.118', Host='nestor.itison.com', Country='GB', FromHeader='com', MailFrom='com' X-Spam-charsets: plain='utf-8', html='utf-8' Thursday, 21 February 13
  28. WHAT’S YOUR SPAM SCORE? CGI in .biz TLD X-Sieve: CMU

    Sieve 2.4 X-Spam-score: 0.0 X-Spam-hits: BAYES_00 -1.9, HTML_IMAGE_RATIO_06 0.001, HTML_MESSAGE 0.001, RCVD_IN_RP_CERTIFIED -3, RCVD_IN_RP_SAFE -2, RP_MATCHES_RCVD -0.001, URI_NOVOWEL 0.5, LANGUAGES unknown, BAYES_USED global, SA_VERSION 3.3.1 X-Spam-source: IP='31.222.170.118', Host='nestor.itison.com', Country='GB', FromHeader='com', MailFrom='com' X-Spam-charsets: plain='utf-8', html='utf-8' Thursday, 21 February 13
  29. WHAT’S YOUR SPAM SCORE? Date: is 6 to 12 hours

    after Received X-Sieve: CMU Sieve 2.4 X-Spam-score: 0.0 X-Spam-hits: BAYES_00 -1.9, HTML_IMAGE_RATIO_06 0.001, HTML_MESSAGE 0.001, RCVD_IN_RP_CERTIFIED -3, RCVD_IN_RP_SAFE -2, RP_MATCHES_RCVD -0.001, URI_NOVOWEL 0.5, LANGUAGES unknown, BAYES_USED global, SA_VERSION 3.3.1 X-Spam-source: IP='31.222.170.118', Host='nestor.itison.com', Country='GB', FromHeader='com', MailFrom='com' X-Spam-charsets: plain='utf-8', html='utf-8' Thursday, 21 February 13
  30. WHAT’S YOUR SPAM SCORE? Uses a mis-spelled version of cialis.

    X-Sieve: CMU Sieve 2.4 X-Spam-score: 0.0 X-Spam-hits: BAYES_00 -1.9, HTML_IMAGE_RATIO_06 0.001, HTML_MESSAGE 0.001, RCVD_IN_RP_CERTIFIED -3, RCVD_IN_RP_SAFE -2, RP_MATCHES_RCVD -0.001, URI_NOVOWEL 0.5, LANGUAGES unknown, BAYES_USED global, SA_VERSION 3.3.1 X-Spam-source: IP='31.222.170.118', Host='nestor.itison.com', Country='GB', FromHeader='com', MailFrom='com' X-Spam-charsets: plain='utf-8', html='utf-8' Thursday, 21 February 13
  31. WHAT’S YOUR SPAM SCORE? HTML has unbalanced body tags X-Sieve:

    CMU Sieve 2.4 X-Spam-score: 0.0 X-Spam-hits: BAYES_00 -1.9, HTML_IMAGE_RATIO_06 0.001, HTML_MESSAGE 0.001, RCVD_IN_RP_CERTIFIED -3, RCVD_IN_RP_SAFE -2, RP_MATCHES_RCVD -0.001, URI_NOVOWEL 0.5, LANGUAGES unknown, BAYES_USED global, SA_VERSION 3.3.1 X-Spam-source: IP='31.222.170.118', Host='nestor.itison.com', Country='GB', FromHeader='com', MailFrom='com' X-Spam-charsets: plain='utf-8', html='utf-8' Thursday, 21 February 13
  32. WHAT’S YOUR SPAM SCORE? HTML font color similar to background

    X-Sieve: CMU Sieve 2.4 X-Spam-score: 0.0 X-Spam-hits: BAYES_00 -1.9, HTML_IMAGE_RATIO_06 0.001, HTML_MESSAGE 0.001, RCVD_IN_RP_CERTIFIED -3, RCVD_IN_RP_SAFE -2, RP_MATCHES_RCVD -0.001, URI_NOVOWEL 0.5, LANGUAGES unknown, BAYES_USED global, SA_VERSION 3.3.1 X-Spam-source: IP='31.222.170.118', Host='nestor.itison.com', Country='GB', FromHeader='com', MailFrom='com' X-Spam-charsets: plain='utf-8', html='utf-8' Thursday, 21 February 13
  33. WHAT’S YOUR SPAM SCORE? HTML: images with 0-400 bytes of

    words X-Sieve: CMU Sieve 2.4 X-Spam-score: 0.0 X-Spam-hits: BAYES_00 -1.9, HTML_IMAGE_RATIO_06 0.001, HTML_MESSAGE 0.001, RCVD_IN_RP_CERTIFIED -3, RCVD_IN_RP_SAFE -2, RP_MATCHES_RCVD -0.001, URI_NOVOWEL 0.5, LANGUAGES unknown, BAYES_USED global, SA_VERSION 3.3.1 X-Spam-source: IP='31.222.170.118', Host='nestor.itison.com', Country='GB', FromHeader='com', MailFrom='com' X-Spam-charsets: plain='utf-8', html='utf-8' Thursday, 21 February 13
  34. WHAT’S YOUR SPAM SCORE? Something is emphatically guaranteed X-Sieve: CMU

    Sieve 2.4 X-Spam-score: 0.0 X-Spam-hits: BAYES_00 -1.9, HTML_IMAGE_RATIO_06 0.001, HTML_MESSAGE 0.001, RCVD_IN_RP_CERTIFIED -3, RCVD_IN_RP_SAFE -2, RP_MATCHES_RCVD -0.001, URI_NOVOWEL 0.5, LANGUAGES unknown, BAYES_USED global, SA_VERSION 3.3.1 X-Spam-source: IP='31.222.170.118', Host='nestor.itison.com', Country='GB', FromHeader='com', MailFrom='com' X-Spam-charsets: plain='utf-8', html='utf-8' Thursday, 21 February 13
  35. WHAT’S YOUR SPAM SCORE? Subject line starts with Buy or

    Buying X-Sieve: CMU Sieve 2.4 X-Spam-score: 0.0 X-Spam-hits: BAYES_00 -1.9, HTML_IMAGE_RATIO_06 0.001, HTML_MESSAGE 0.001, RCVD_IN_RP_CERTIFIED -3, RCVD_IN_RP_SAFE -2, RP_MATCHES_RCVD -0.001, URI_NOVOWEL 0.5, LANGUAGES unknown, BAYES_USED global, SA_VERSION 3.3.1 X-Spam-source: IP='31.222.170.118', Host='nestor.itison.com', Country='GB', FromHeader='com', MailFrom='com' X-Spam-charsets: plain='utf-8', html='utf-8' Thursday, 21 February 13
  36. WHAT’S YOUR SPAM SCORE? Message says that prices aren't too

    expensive X-Sieve: CMU Sieve 2.4 X-Spam-score: 0.0 X-Spam-hits: BAYES_00 -1.9, HTML_IMAGE_RATIO_06 0.001, HTML_MESSAGE 0.001, RCVD_IN_RP_CERTIFIED -3, RCVD_IN_RP_SAFE -2, RP_MATCHES_RCVD -0.001, URI_NOVOWEL 0.5, LANGUAGES unknown, BAYES_USED global, SA_VERSION 3.3.1 X-Spam-source: IP='31.222.170.118', Host='nestor.itison.com', Country='GB', FromHeader='com', MailFrom='com' X-Spam-charsets: plain='utf-8', html='utf-8' Thursday, 21 February 13
  37. TRACKING WHO GOT WHAT Thread-Topic: Hello! Thread-Index: Ac4N79a7oEDJf+ZLS9m3xcdfi2OHCAAM2Y+AABkdfTA= Date: Tue,

    19 Feb 2013 14:32:07 +0000 Deferred-Delivery: Tue, 19 Feb 2013 14:32:00 +0000 Message-ID: <[email protected]> References: <[email protected]> <[email protected]> In-Reply-To: <[email protected]> Accept-Language: en-GB, en-US Content-Language: en-US Thursday, 21 February 13
  38. TRACKING WHO GOT WHAT Thread-Topic: Hello! Thread-Index: Ac4N79a7oEDJf+ZLS9m3xcdfi2OHCAAM2Y+AABkdfTA= Date: Tue,

    19 Feb 2013 14:32:07 +0000 Deferred-Delivery: Tue, 19 Feb 2013 14:32:00 +0000 X-App-Message-ID: <[email protected]> References: <[email protected]> <[email protected]> In-Reply-To: <[email protected]> Accept-Language: en-GB, en-US Content-Language: en-US Thursday, 21 February 13
  39. TRACKING WHO GOT WHAT Thread-Topic: Hello! Thread-Index: Ac4N79a7oEDJf+ZLS9m3xcdfi2OHCAAM2Y+AABkdfTA= Date: Tue,

    19 Feb 2013 14:32:07 +0000 Deferred-Delivery: Tue, 19 Feb 2013 14:32:00 +0000 Return-Path: <[email protected]> In-Reply-To: <[email protected]> Accept-Language: en-GB, en-US Content-Language: en-US Thursday, 21 February 13
  40. HANDLING INCOMING EMAIL OUTBOUND EMAIL IS HARD. INBOUND EMAIL IS

    HELL. LET SOMEONE ELSE DO IT. Thursday, 21 February 13
  41. YOUR OWN METRICS ARE THE BEST GUIDE TO WHEN SOMETHING’S

    BROKEN •Bounce Rate (very reliable) Thursday, 21 February 13
  42. YOUR OWN METRICS ARE THE BEST GUIDE TO WHEN SOMETHING’S

    BROKEN •Bounce Rate (very reliable) •Junk Rates (very reliable) Thursday, 21 February 13
  43. YOUR OWN METRICS ARE THE BEST GUIDE TO WHEN SOMETHING’S

    BROKEN •Bounce Rate (very reliable) •Junk Rates (very reliable) •Open Rates (sort of reliable) Thursday, 21 February 13
  44. YOUR OWN METRICS ARE THE BEST GUIDE TO WHEN SOMETHING’S

    BROKEN •Bounce Rate (very reliable) •Junk Rates (very reliable) •Open Rates (sort of reliable) •Click Rates (very reliable) Thursday, 21 February 13
  45. YOUR OWN METRICS ARE THE BEST GUIDE TO WHEN SOMETHING’S

    BROKEN •Bounce Rate (very reliable) •Junk Rates (very reliable) •Open Rates (sort of reliable) •Click Rates (very reliable) •Read time Rates (not at all reliable) Thursday, 21 February 13
  46. DEAL WITH BROKEN WINDOWS QUICKLY CHECK FOR BROKEN WINDOWS OFTEN

    & FIX THEM QUICKLY Thursday, 21 February 13
  47. DON’T SEND APP MAIL FROM YOUR ROOT DOMAIN YOUR TEAMMATES

    HAVE DIFFERENT NEEDS & GET TETCHY WHEN YOU BREAK THEIR EMAIL Thursday, 21 February 13
  48. Message-Id: <[email protected]> Subject: Please confirm your email address with itison

    Mime-Version: 1.0 X-Auto-Response-Suppress: OOF, AutoReply Content-Type: multipart/alternative;..... List-Unsubscribe: <mailto:[email protected]? subject=unsub_bd49512629e636b9e5b6fe8931_1242916860> Thursday, 21 February 13
  49. I’M NOT IN THE OFFICE RIGHT NOW Message-Id: <[email protected]> Subject:

    Please confirm your email address with itison Mime-Version: 1.0 X-Auto-Response-Suppress: OOF, AutoReply Content-Type: multipart/alternative;..... List-Unsubscribe: <mailto:[email protected]? subject=unsub_bd49512629e636b9e5b6fe8931_1242916860> Thursday, 21 February 13
  50. CATCH TYPOS - MAILCHECK.JS <script> var domains = ['hotmail.com', 'gmail.com',

    'aol.com']; var topLevelDomains = ["com", "net", "org"]; var superStringDistance = function(string1, string2) { // a string distance algorithm of your choosing } $('#email').on('blur', function() { $(this).mailcheck({ domains: domains, topLevelDomains: topLevelDomains, distanceFunction: superStringDistance, suggested: function(element, suggestion) { }, empty: function(element) { } }); }); </script> Thursday, 21 February 13