Defect #2927
Email notification does not work if user_name is a number
| Status: | Closed | Start date: | 2009-03-07 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | Email notifications | |||
| Target version: | 0.9.0 | |||
| Affected version: | 0.8.1 | Resolution: | Fixed |
Description
When user_name is a number you cannot send emails according to email.yml.example
An error occurred while sending mail (can't convert Fixnum into String)
Not working settings:
production:
delivery_method: :smtp
smtp_settings:
address: smtprelaylb.ispgateway.de
port: 25
# domain: ispgateway.de
authentication: :login
user_name: 20002456
password: blueberry
Solution: Working Settings with adjusted user_name
production:
delivery_method: :smtp
smtp_settings:
address: smtprelaylb.ispgateway.de
port: 25
# domain: ispgateway.de
authentication: :login
user_name: "20002456"
password: blueberry
You should adjust email.yml.example or fix the code (because finding out this takes some time for a not ruby developer like me). Notice that the same happens if the password is a number (see #2738)
Associated revisions
Add doube quotes to user_name and password in email.yml.example (#2927).
History
Updated by Jean-Philippe Lang almost 3 years ago
- Status changed from New to Closed
- Target version set to 0.9.0
- Resolution set to Fixed
YAML will automatically unserialize 20002456 as an integer, and "20002456" as a string.
I don't want to patch ActionMailer, so double quotes are added to email.yml.example in r2564.
Thanks for pointing this out.