From fd984e850050710bfcba45c641757bce24072e12 Mon Sep 17 00:00:00 2001 From: Sam DeCesare Date: Wed, 11 Jun 2014 17:41:06 -0700 Subject: fix bug in email with name example code The display name in the email "to" field needs to be quoted otherwise your email-sending service will fail when trying to deliver mail to user's with commas in their name (i.e. John Smith, M.D.). --- guides/source/action_mailer_basics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source') diff --git a/guides/source/action_mailer_basics.md b/guides/source/action_mailer_basics.md index c7117027c0..cb1c1c653d 100644 --- a/guides/source/action_mailer_basics.md +++ b/guides/source/action_mailer_basics.md @@ -309,7 +309,7 @@ email address in the format `"Full Name "`. ```ruby def welcome_email(user) @user = user - email_with_name = "#{@user.name} <#{@user.email}>" + email_with_name = %("#{@user.name}" <#{@user.email}>) mail(to: email_with_name, subject: 'Welcome to My Awesome Site') end ``` -- cgit v1.2.3