diff options
author | Sam DeCesare <sam@samdecesare.com> | 2014-06-11 17:41:06 -0700 |
---|---|---|
committer | Sam DeCesare <sam@samdecesare.com> | 2014-06-11 17:41:06 -0700 |
commit | fd984e850050710bfcba45c641757bce24072e12 (patch) | |
tree | 34621ad0d11c7bcb98c12a8428abb8c6344a2cfe /guides | |
parent | df3c78296a404e83df141dbeead506e4884f2a0f (diff) | |
download | rails-fd984e850050710bfcba45c641757bce24072e12.tar.gz rails-fd984e850050710bfcba45c641757bce24072e12.tar.bz2 rails-fd984e850050710bfcba45c641757bce24072e12.zip |
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.).
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/action_mailer_basics.md | 2 |
1 files changed, 1 insertions, 1 deletions
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 <email>"`. ```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 ``` |