Forum: Ruby on Rails How to format text in the mailer?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D3fc5887a2f39f2e0c8989d39ce5e6f9?d=identicon&s=25 Bharat Ruparel (bruparel)
on 2008-10-04 20:11
Suppose
site_name = "Company XYZ"
I would like to Underline the site name in the emails subject line as
in:
site_name = "Company XYZ"
             ----------

What is the easiest way for doing this?
Thanks.
Bharat
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2008-10-04 21:50
(Received via mailing list)
On Oct 4, 7:11 pm, Bharat Ruparel <rails-mailing-l...@andreas-s.net>
wrote:
> Suppose
> site_name = "Company XYZ"
> I would like to Underline the site name in the emails subject line as
> in:
> site_name = "Company XYZ"

As far as I know you can't. Subject lines are plain text.

Fred
D3fc5887a2f39f2e0c8989d39ce5e6f9?d=identicon&s=25 Bharat Ruparel (bruparel)
on 2008-10-05 00:17
Thanks Fred. I will not waste time trying to format the subject line.

This may be a dumb question.  But, I will ask anyway.

Suppose that I want the site_name text underlined in the body of email
rather than subject line as I originally asked above.  I can always do
that using HTML, but will that not make my email hard to read for
someone using an email client that does not support HTML
formatting/conversion?  Is there some unicode standard way of formatting
email that is universally readable?

I read somewhere on the web that Rails 2.2 will have some of the email
formatting features.  Would you (or anyone else) know anything about it?
Bharat
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2008-10-05 00:57
(Received via mailing list)
On 4 Oct 2008, at 23:17, Bharat Ruparel wrote:

> formatting
> email that is universally readable?

You can indeed do HTML emails, but many people don't like those. You
can however have multipart emails: a plain text part and an html part.
People with mail viewers that can understand html will see the html
stuff, others (or those who have set appropriate settings in their
email client) will see the plain text version. (see
http://api.rubyonrails.com/classes/ActionMailer/Base.html)

Fred
D3fc5887a2f39f2e0c8989d39ce5e6f9?d=identicon&s=25 Bharat Ruparel (bruparel)
on 2008-10-05 02:09
Thank you.
This topic is locked and can not be replied to.