• Like
Action Mailer In Action
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Action Mailer In Action

  • 4,216 views
Published

A talk about using ActionMailer safely, how to keep out of the spam box and how to test your emails before your customers see them.

A talk about using ActionMailer safely, how to keep out of the spam box and how to test your emails before your customers see them.

Published in Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
4,216
On SlideShare
0
From Embeds
0
Number of Embeds
3

Actions

Shares
Downloads
78
Comments
0
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. ActionMailer in Action
    • Rob Kaufman
    • Notch8.com
    • [email_address]
    • Talk about ActionMailer
      • Beyond just send a message via SMTP
  • 2. Intro to ActionMailer (Send)
    • ActionMailer allows you to send and receive email. Most people just use send
    • ActionMailer is more MV than MVC
    • AM model in /app/model
      • inherets from ActionMailer::Base instead of ActionRecord::Base
    • AM views are stored in /app/views/model_name
    • Plain text vs HTML email
  • 3. Safety First - Overview
    • IDs in email
    • Careful about 'real' email addresses in development env
    • Careful about a lot of email
    • Understand limits of email via own server
  • 4. Safety First - Checklist
    • Before Committing
      • Create new email tagging
      • Create new NotifierTest method
      • Create new Notifier method
      • Create new Notifier view
      • Verify that email body includes a link at the bottom to unsubscribe
  • 5. Safety First - Checklist
    • Before Commiting (cont.)
      • Verify that the email contains the lead id
      • Verify that the email bodies fields are all correctly formated
      • Verify mime-type if sending HTML email
      • Test, Commit, Push
      • Bootstrap
  • 6. Safety First - Checklist
    • Before Sending
      • Send sample copy to Design (currently Andy) and Marketing (Casey and Carrie)
      • Send sample to at least 2 individuals (besides author) to look for typos/errors
      • Run RAILS_ENV=production rake email:check EMAIL_TEMPLATE=’template_name’ to verify Inbox delivery
  • 7. Safety First - mail_safety
    • Overrides Tmail::Mail.deliveries so that everything is sent where you want it.
    • Can be used w/ either sendmail or smtp
  • 8. Setting up Email Testing
  • 9. Testing - Assert Email
  • 10. Testing - Email Test Task
    • Hits the big 4 (Hotmail, AOL, Yahoo, Gmail)
    • Can be used just to send the templates
    • If freepopd is installed, can check that the emails where received as well
  • 11. Testing - Email Test Task
    • rake email:send
      • Sends all templates
    • rake email:send EMAIL_TEMPLATE=hello
      • Just sends the hello email
    • rake email:accounts:check
      • Sends all , waits for you, then checks all
    • rake email:accounts:clear
      • Removes all emails (cleans accounts)
    • rake email: accounts:count_messages
  • 12. Summary and Questions