[Rails] Extracting Email Attachment Content

Nathan Mealey
2006-04-28T16:10:38Z

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
File.open(attachment.read, "r"), to no avail. But that fails stating
that there is no such file or directory (but the attachment is there for
certain).



Any suggestions would be terribly appreciated.



Nathan Mealey

Operations Director

Northeast Region

Pilgrim IT, LLC



NORTHEAST OFFICE

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.



-------------- next part --------------
An HTML attachment was scrubbed...