On 4/24/07, Tim X <timx / nospam.dev.null> wrote:
> david <savatagedg / hotmail.com> writes:
>
> > I know Ruby can do a lot of neat stuff, I was just wondering if someone
> > has found a way to read emails from a gmail account. The reason is I'm
> > hoping to create a system that a user can email an account with a
> > command, and Ruby will read it and exacute that command. Any ideas /
> > suggestions?
> >
>
> Well, this can be done and in fact has been done before many times. In
> principal, this is not very different in concept from mail lists which allow
> you to send commands to the list server to subscribe, unsubscribe or get
> information on a particular list etc. In fact, back before the web and http,
> systems that used e-mail to initiate some action/command were fairly common.

Yes, you can define some kind of plain-text verbage in the message body,
subject line etc.

The main problem you will encounter is that Net::SMTP has limitations
with respect to accessing GMail (I think its due to TLS, or something that
is currently unsupported).

As other posters have mentioned, you *really* do need to consider the
security implications.

Anyway, other suggestions - Ruby's Mail class is nice for parsing e-mail
files and received e-mails.

You might want to consider not building in Transport level stuff - i.e. don't
do POP3, IMAP or SMTP, but use a standard mail client that uses a disk
directory as your inbox (that you can monitor changes to).