ruby-on-railsparsingemailmailtoaol

Rails confirmation email aol parsing error with email name


When I get a confirmation email sent via my rails app, I use this code

<a href='mailto:John%20Doe<Johndoe@random.com>?subject=Billing%20Submission'>LINK</a>

The email that shows up in all different emails is good except for aol.

In aol, it shows up as: ?subject=Billing%20Submission'>LINK

Is there any way around this without compromising the name being added?


Solution

  • Replace

    <a href='mailto:John%20Doe<Johndoe@random.com>?subject=Billing%20Submission'>LINK</a>
    

    With

    <a href='mailto:John%20Doe%3CJohndoe@random.com%3E?subject=Billing%20Submission'>LINK</a>
    

    > after Johndoe@random.com was actually ending the starting tag of a (anchor).

    Use URL encoding equivalent for < (%3C) and > (%3E) sign.