Forum: Ruby on Rails Composing HTML e-mail with a PDF attachment

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Reuven M. Lerner (Guest)
on 2005-12-17 00:06
(Received via mailing list)
Hi, everyone.  I've been using Rails for a little while now, and am
really, really enjoying the experience.

I'm having the darndest time trying to send e-mail whose contents are in
HTML, and which includes a PDF attachment.  Following various
instructions (in the Pragmatic book, as well as at
I'm able to send HTML e-mail *or* a PDF attachment (generated from
pdf/writer).  But I can't figure out how to use an .rhtml template to
generate the HTML, and then attach a PDF file to it.  I've thought about
rendering a separate template from the one with the same name as my
ActionMailer subclass, but it seems a bit roundabout to define two
different methods to send one e-mail message.

I've tried the suggestions at
but to no avail.

Does anyone have a simple solution to this problem?

Thanks in advance,

Peter B. (Guest)
on 2005-12-18 18:25
(Received via mailing list)
Hi Reuven,
which way do you send the email? Using the raw TMail object as described
in the HowToSendMimeMultipartEmailsWithActionMailer? Can you post some


This topic is locked and can not be replied to.