Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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.).
  • Loading branch information...
commit fd984e850050710bfcba45c641757bce24072e12 1 parent df3c782
@samdec samdec authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  guides/source/action_mailer_basics.md
View
2  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
```
Please sign in to comment.
Something went wrong with that request. Please try again.