Search code examples
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<[email protected]>?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<[email protected]>?subject=Billing%20Submission'>LINK</a>
    

    With

    <a href='mailto:John%20Doe%[email protected]%3E?subject=Billing%20Submission'>LINK</a>
    

    > after [email protected] was actually ending the starting tag of a (anchor).

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