This project is archived and is in readonly mode.

#5255 ✓invalid

ActionMailer 3.0 drops name part in email

Reported by eydaimon | July 30th, 2010 @ 08:04 PM


m = mail to: "Name <>"
#=> ""

Notice how the to: header drops the "Name" part of the address.

Edited by Rohit Arondekar for formatting.

Comments and changes to this ticket

  • eydaimon

    eydaimon July 30th, 2010 @ 08:04 PM

    • Tag changed from rails 3.0.rc to rails 3.0.0.beta3
  • Rohit Arondekar

    Rohit Arondekar October 7th, 2010 @ 06:51 AM

    • Importance changed from “” to “Low”

    However the information is not completely lost, it's stored somewhere.

        m = mail :to => "Name <>"
        #<Mail::Message:26124640, Multipart: false, Headers: <From:>, <To: Name <>>, <Subject: Welcome email>, <Mime-Version: 1.0>, <Content-Type: text/plain>>

    Did you have any specific issue or can this ticket be closed?

  • eydaimon

    eydaimon October 7th, 2010 @ 03:59 PM

    E-Mail clients render the name field to display the email better, so it's definitely desired. It's standard, and I'm quite surprised you're suggesting just closing the ticket and ignoring this.

  • Aditya Sanghi

    Aditya Sanghi October 7th, 2010 @ 05:31 PM

    • Assigned user set to “Mikel Lindsaar”

    @eydaimon , i think what rohit is trying to probably say is that email clients don't do "" to display the sender. The mail object within a rails, has sufficiently stored the attributes of the mail message. Mail gem converts it into an email message and transfers it as per the RFC (cant recall the number just now) to the clients.

    I too disagree that is sufficient evidence that this functionality is not working.

    After some introspection, i found that the way you probably want to test it is -

      m[:to].formatted == "Name <>".

    If you indeed think its a bug, you may want to raise it against the mail gem at but i doubt it will stand.

    Perhaps, Mikel can chime in since he is the maintainer of that gem as well as ActionMailer.

  • eydaimon

    eydaimon October 7th, 2010 @ 06:51 PM

    @aditya, thanks for the clarification. I re-read the thread and you're correct. For some reason I thought it wasn't being included in the sent-mail when I responded again which is not true.

    Please close this ticket.

  • David Trasbo

    David Trasbo October 7th, 2010 @ 08:27 PM

    • State changed from “new” to “invalid”


Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>