Forum: Ruby on Rails Creating html e-mails with embedded graphics

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.
4cb6ddc3d47a0710b65fa4e64446ddb4?d=identicon&s=25 Errol Siegel (errolsiegel)
on 2006-01-28 01:11
I am new to RoR and I have a new project for which I'd like to use it.
I have created a short list of the important functionality I need and it
seems like everything is covered except one thing:

I need to generate and send mime-encoded e-mails with a plain text part,
an HTML part with embedded graphics, and possibly an attachment.

In the old days (up until last week) I would have used some a nifty PHP
class that I've used in the past to do this part.  Is there some
functionality built in to ActionMailer that handles this?  If not, is
there a plugin that adds this functionality?

05be5d6610e2c3f1780aa0e39e902e93?d=identicon&s=25 Farrel Lifson (Guest)
on 2006-01-28 08:27
(Received via mailing list)
You can embed data in the actual url using the data: url type. Check
4cb6ddc3d47a0710b65fa4e64446ddb4?d=identicon&s=25 Errol Siegel (errolsiegel)
on 2006-01-28 16:22
Farrel Lifson wrote:
> You can embed data in the actual url using the data: url type. Check
> out

Thanks very much for the reference.  However, after reading the
wikipedia entry, it does not appear that this is a workable solution for
two reasons:

1. According to the article, IE does not support this.

2. All browsers limit the size of the data.  Given that a Base64 encoded
image will be about 1/3 larger than the file size on disk, that means I
would be limited to really small images.

I had read that ActionMailer (and the classes upon which it is based)
provides a lot of powerful functionality.  Please don't flame me for
saying this, but it would seem surprising to me if some basic MIME
features like this were missing.

There are several classes for PHP that allow me to import an HTML page,
scan it for img tags, and output MIME parts to add to the e-mail.

Does this type of functionality exist already in ActionMailer?

Thanks again,
This topic is locked and can not be replied to.