Forum: Rails Engines Best way to extract data from emails?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Woei S. (Guest)
on 2006-02-06 03:26
Hi,

I've been working on something that would look at a form mail, and then
extract information out of that mail into ruby usable form.

For instance, let's say someone sends you an email through eBay's form
mail facility, but her message body is encapsulated in all that nice and
fancy HTML, so what I'd like to do is to hack up something that can read
in this email, and just get at the message body less the extra
formatting.

What'd be the best way to go about doing it?

I know it can be done with regular expressions, but ideally I want to
make this a solution that can be easily updated as the format of the
emails change, so regular expressions might not be able to give that
flexibility.

Any tips welcome! :)

Thanks.
James A. (Guest)
on 2006-02-07 14:40
(Received via mailing list)
You might get more response to this on the rails list itself, since
it's not engine-specific....

- james

On 2/6/06, Woei S. <removed_email_address@domain.invalid> wrote:
>
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> engine-users mailing list
> removed_email_address@domain.invalid
> http://lists.rails-engines.org/listinfo.cgi/engine...
>


--
* J *
  ~
Wybo W. (Guest)
on 2006-05-06 00:20
(Received via mailing list)
> in this email, and just get at the message body less the extra
> formatting.

I once did this by piping the message-body through a console-based
browser such as w3m... Seems pretty fail-safe and easy...

Wybo
This topic is locked and can not be replied to.