Including CSS from a stylesheet file in a an e-mail

How can I include the contents of the file /public/stylesheets/print.css
in an
RHTML page for ActionMailer? Because there is no controller or session,
none
of the usual tricks work.

Do you have to use basic file IO or there some convenience method I
haven’t
seen?

Thanks
Ashley

you’ll most likely have to have the css either ‘hard-coded’ in the
resulting html within style tags or make sure the link reference is a
full URL, ie, http://www.yoursite.com/stylesheets/print.css and URI is
publically accessible.

...

or

using stylesheet_link_tag won’t do it as it does not include the
hostname in the href attribute.

On Friday 18 August 2006 12:19, Chris H. wrote:

using stylesheet_link_tag won’t do it as it does not include the
hostname in the href attribute.

Thanks

Eventually we got it working with
<%= IO.read(“public/stylesheets/print.css”) %>

I was hoping there’d be a helper function or something to handle this
but I
guess the solution is pretty simple.

Ashley