Forum: Ruby on Rails Extracting Email Attachment Content

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.
0b8601544389bf0603f63bfe5afae865?d=identicon&s=25 Nathan Mealey (Guest)
on 2006-04-28 18:12
(Received via mailing list)
If an email incoming to Actionmailer has an .htm attachment, how is it
possible to extract the file's text (the html text in the file) to
insert into the database?

I've tried reading the attachment like so, theFile =, "r"), to no avail. But that fails stating
that there is no such file or directory (but the attachment is there for

Any suggestions would be terribly appreciated.

Nathan Mealey

Operations Director

Northeast Region

Pilgrim IT, LLC


1 Short Street

Northampton, MA 01060

TEL  413.517.5010 x201

FAX  413.587.0572

NOTICE: This email and any attachments are intended only for the
addressee and may contain information that is confidential and/or
legally privileged. If you are not the intended recipient or have
received this email in error, please notify the sender by return email
or by calling 866-434-4976. You should then delete the message and any
attachments or copies. If you are not the intended recipient, you are
prohibited from retaining, distributing, disclosing or using any
information contained herein.
This topic is locked and can not be replied to.