1

I am trying to simply add "full and plain text" to the body of an email. I have a site that will show a user's ad and if another user wants to reach out to the owner of the ad they will click on make an offer. at that point, the sender's email client i.e hotmail or whatever is on their desktop will pull up the with the following info prefilled; the user's email and the subject. however, I need the body to populate. I can get it to work when there is one line but if I have multiple lines or a paragraph it will not pull the text over. here is my come btw i am not user a mailer i just want something simple.

ron davis
  • 15
  • 5
  • here is the code <%= mail_to(@listing.user.email, "Make an Offer", class: 'btn btn-success btn-sm', subject: @listing.title, body: @listing.price) %> – ron davis Feb 19 '17 at 17:59
  • Might answer your question: https://stackoverflow.com/questions/11507387/mailto-body-formatting – spickermann Feb 19 '17 at 18:14
  • that didn't work! I need to pull in the user email, ad title, and the ad description from the database, the output was exactly what I put in not info from the database – ron davis Feb 19 '17 at 19:03
  • Did you try a string with new lines `"line one \n line two"`? – spickermann Feb 19 '17 at 20:51

0 Answers0