[Rails] Accessing just the body of email in text format?
softwareengineer 99
softwareengineer99 at yahoo.com
Fri Feb 17 06:25:16 GMT 2006
I have gotten to the part where I can access the body of the email with
# email.body
after passing it to my receiver function using
body = imap.fetch(message_id, ["BODY[]"])[0].attr['BODY[]']
The problem now is that I get both a text version of the email as well as the HTML version of the email.
How can I just get the text version of the email.
Thanks
Frank
softwareengineer 99 <softwareengineer99 at yahoo.com> wrote: I am interested in accessing the body of the email in text format using IMAP to receive emails.
So far I have tried the following
#body = imap.fetch(message_id, "BODY[TEXT]")
#body = imap.fetch(message_id, ["BODY[]"])[0].attr['BODY[]']
But both of the above give me body text + the headers including Content-Type etc. How can I access just the body in text format.
I appreciate your assistance.
Thanks
Frank
---------------------------------
Relax. Yahoo! Mail virus scanning helps detect nasty viruses!_______________________________________________
Rails mailing list
Rails at lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails
---------------------------------
What are the most popular cars? Find out at Yahoo! Autos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060217/8a2583c5/attachment.html
More information about the Rails
mailing list