CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail
description
Transcript of CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail
![Page 1: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/1.jpg)
The Importance of
Transactional E-mail
CodeCamp Iasi Vincent van Scherpenseel
![Page 2: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/2.jpg)
ProgramIntroduction What is transactional e-mail.
![Page 3: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/3.jpg)
ProgramIntroduction What is transactional e-mail.
Use-cases When and where to use it.
![Page 4: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/4.jpg)
ProgramIntroduction What is transactional e-mail.
Use-cases When and where to use it.
Implementation Sending e-mail from your website or app.
![Page 5: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/5.jpg)
ProgramIntroduction What is transactional e-mail.
Use-cases When and where to use it.
Implementation Sending e-mail from your website or app.
Templating How to make it look good.
![Page 6: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/6.jpg)
ProgramIntroduction What is transactional e-mail.
Use-cases When and where to use it.
Implementation Sending e-mail from your website or app.
Templating How to make it look good.
Optimization How to measure and optimize for success.
![Page 7: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/7.jpg)
What is transactional e-mail?
A personal e-mail sent to a single individual usually
based on an action they performed.
![Page 8: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/8.jpg)
How to send it?
Your own mail server. Third-party service.
![Page 9: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/9.jpg)
Why out-source it?
1. Deliverability
2. Maintenance
3. Actionable insights
4. Increase revenue, decrease costs+
![Page 10: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/10.jpg)
Third-party services
![Page 11: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/11.jpg)
Use-cases When and where to use it.
![Page 12: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/12.jpg)
Account actions
![Page 13: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/13.jpg)
Registration confirmation
![Page 14: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/14.jpg)
Event announcements
![Page 15: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/15.jpg)
Back-in-stock notification
![Page 16: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/16.jpg)
Review request
![Page 17: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/17.jpg)
Personal discount campaigns
![Page 18: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/18.jpg)
Personal motivation
![Page 19: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/19.jpg)
Webhooks!
Don’t let hard-bounces lead to dead-ends.
![Page 20: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/20.jpg)
Implementation Sending e-mail from your website or app.
![Page 21: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/21.jpg)
Sending Method
SMTP API
![Page 22: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/22.jpg)
SMTP
! SMTP Host: smtp.mandrillapp.com! SMTP Port: 587! Username: $yourUsername! Password: $yourApiKey
![Page 23: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/23.jpg)
SMTP
Easy to set up and useful for: • Sending system e-mails • Sending personal e-mails • Cases where API integration is impossible
![Page 24: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/24.jpg)
API
The Right Way™ • Usually offers more functionality • No need for additional SMTP library • Much nicer code
![Page 25: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/25.jpg)
API{
"key": "$yourApiKey", "template_name": “codecamp2014", "template_content": [ { "name": "name", "content": “Vincent van Scherpenseel" } ], "message": { "subject": “Thank you for your registration!", "from_email": “[email protected]”, "from_name": "CodeCamp", "to": [ { "email": “[email protected]”, "name": “Vincent van Scherpenseel", "type": "to" } ], "track_opens": true, "track_clicks": true, [..]
![Page 26: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/26.jpg)
API wrappers
Generic PHP wrappergithub.com/dotblue/Mandrill
.Net wrappergithub.com/shawnmclean/Mandrill-
dotnet
![Page 27: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/27.jpg)
[..]! "attachments": [ { "type": "application/pdf", "name": "contract_007.pdf", "content": base64_encode($pdfContents) } ],! [..]
Sending Attachments
![Page 28: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/28.jpg)
[..]! "attachments": [ { "type": "application/pdf", "name": "contract_007.pdf", "content": base64_encode($pdfContents) } ],! [..]
Sending Attachments
![Page 29: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/29.jpg)
Don’t Slow Down the User!
Use the async-flag and catch exceptions.
[..]! "async": false,! [..]
![Page 30: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/30.jpg)
Prepare for the Worst
Although rarely, downtime happens. So use a queue. !
• Poor man’s solution: crontab + database • Rich man’s solution: job manager
![Page 31: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/31.jpg)
Watch your Reputation
Sending quota}Reputation score}Deliverability ratio}
![Page 32: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/32.jpg)
Sender Policy Framework
Use SPF to define which hosts are allowed to send e-mail.
local:~ vincent$ host -t txt saleschamp.nl!saleschamp.nl descriptive text "v=spf1 a include:_spf.google.com include:spf.mandrillapp.com ~all"!!local:~ vincent$ host -t txt spf.mandrillapp.com!spf.mandrillapp.com descriptive text "v=spf1 ip4:198.2.128.0/24 ip4:198.2.132.0/22 ip4:205.201.131.128/25 ip4:205.201.134.128/25 ip4:205.201.136.0/23 ip4:205.201.139.0/24 ?all"
![Page 33: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/33.jpg)
DomainKeys Identified Mail
DKIM proves that an e-mail belongs to a specific domain name. Encryption proves e-mail has not been tampered with while in transit.
local:~ vincent$ host -t txt mandrill._domainkey.saleschamp.nl!mandrill._domainkey.saleschamp.nl descriptive text "k=rsa\; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrLHiExVd55zd/IQ/J/mRwSRMAocV/hMB3jXwaHH36d9NaVynQFYV8NaWi69c1veUtRzGt7yAioXqLj7Z4TeEUoOLgrKsn8YnckGs9i3B3tVFB+Ch/4mPhXWiNfNdynHWBcPcbJ8kjEQ2U8y78dHZj1YeRXXVvWob2OaKynO8/lQIDAQAB\;"
![Page 34: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/34.jpg)
Use Sub-Accounts
Useful for: • Test environments • System e-mail • Multi-tenant situations
[..]! "subaccount": "development-env",! [..]
Sub-accounts have their own reputation.
![Page 35: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/35.jpg)
Templates How to make it look good.
![Page 36: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/36.jpg)
Best Practices
• Understand what you want to achieve. • Have a very clear call-to-action. • Make images clickable (remember fallbacks). • Design for a maximum width of 600 px. • Web fonts support is extremely limited. E-mail client CSS support overview:http://tinyurl.com/emailcss
![Page 37: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/37.jpg)
Responsive Web Design
Photo: Brad Frost
![Page 38: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/38.jpg)
Responsive Web Design
Support for media queries on mobile devices is pretty good! Except for Google Mail. Useful overview: www.campaignmonitor.com/guides/ mobile/
![Page 39: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/39.jpg)
Testing
From $79 per month.www.litmus.com
Spam filter testing from $149 per month.
From $45 per month.www.emailonacid.com
Spam filter testing included.
![Page 40: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/40.jpg)
Actions in the Inbox
• Based on an open-standard (schema.org) • Allows you to perform actions immediately
from your inbox • Easy to implement, using JSON-LD
![Page 41: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/41.jpg)
Actions in the Inbox
• Based on an open-standard (schema.org) • Allows you to perform actions immediately
from your inbox • Easy to implement, using JSON-LD
<script type="application/ld+json"> { "@context": "http://schema.org", "@type": "EventReservation", "reservationNumber": "IO12345", "underName": { "@type": "Person", "name": "John Smith" }, "reservationFor": { "@type": "Event", "name": "Google I/O 2013", "startDate": "2013-05-15T08:30:00-08:00", "location": { "@type": "Place", "name": "Moscone Center", "address": { "@type": "PostalAddress", "streetAddress": "800 Howard St.", "addressLocality": "San Francisco", "addressRegion": "CA", "postalCode": "94103", "addressCountry": "US" } } }
![Page 42: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/42.jpg)
Actions in the Inbox
Review ActionsInitiate the reviews directly from the inbox.
![Page 43: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/43.jpg)
Actions in the Inbox
One Click Actions Users perform actions without visiting your site.
![Page 44: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/44.jpg)
Actions in the Inbox
Reservations Actions Display information in the same consistent way.Let users check in directly from their inbox.
![Page 45: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/45.jpg)
Optimization How to measure and optimize for success.
![Page 46: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/46.jpg)
Key Performance Indicators
• Deliverability (bounces & rejects)
• Opens
• Clicks
• Conversions
![Page 47: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/47.jpg)
A/B testing
A/B testing your e-mails isas important as testing your website.
[..]! "tags": [ "password-reset" ],! [..]
![Page 48: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/48.jpg)
A/B testing
A/B testing your e-mails isas important as testing your website.
![Page 49: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/49.jpg)
Google Analytics
Auto-tag your transactional e-mailfor Google Analytics tracking.
[..]! "google_analytics_domains": [ “codecamp.ro” ], "google_analytics_campaign": "registration_confirmation",! [..]
![Page 50: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/50.jpg)
Respect your recipients
Use all data you have on your subscribers.
![Page 51: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/51.jpg)
Measure the right things
![Page 52: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/52.jpg)
Measure the right things
Having a lot of conversions does notmean you make the most money.
![Page 53: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/53.jpg)
Key Take-Aways
• Don’t ignore this powerful medium.E-mail is far from dead.
• Use a full API integration.And provide the best User Experience.
• Templating sucks, but we have RWD! Make sure to test properly.
• Monitor your KPIs.Always Be Optimizing.
![Page 54: CodeCamp Iași 2014 - Vincent van Scherpenseel - Transactional E-mail](https://reader033.fdocuments.us/reader033/viewer/2022051817/54828822b4af9f8c0d8b482c/html5/thumbnails/54.jpg)
We’re hiring!
www.dotblue.net/jobswww.dotblue.ro/posturi