Defect #2927

Email notification does not work if user_name is a number

Added by Dominik Appl over 8 years ago. Updated over 1 year ago.

Status:ClosedStart date:2009-03-07
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Email notifications
Target version:0.9.0
Resolution:Fixed Affected version:0.8.1

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

Revision 2564
Added by Jean-Philippe Lang over 8 years ago

Add doube quotes to user_name and password in email.yml.example (#2927).

History

#1 Updated by Jean-Philippe Lang over 8 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.

#2 Updated by Sunny Arge over 1 year ago

Actual area is the password field.
Please change from;

password: blablabla

to;
password: "blablabla" 

That solved my problem.

Also available in: Atom PDF