From: William Smith Date: 2007-04-23T15:10:11+09:00 Subject: Re: Can Ruby read emails? ------=_Part_81916_18240031.1177308609315 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I believe you could use the ActionMailer suite as a standalone to do this, but I second the idea that you'd need to either sanitize the emails or have some kind of authentication or both/ On 4/23/07, Daniel Martin wrote: > > david 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? > > My reaction to such a scheme is "GAH! NOOOOOOOO!" > > That has nothing to do with reading from gmail, and everything to do > with executing commands received via email. > > (I managed to hose a university account royally after setting up a > similar system on VMS once) > > Please implement some sort of authentication and extensive logging of > commands received and the results of executing them. You'll thank > yourself later. Also, protect against replay attacks - make sure that > receiving the same exact email twice won't cause commands to be > executed twice. > > -- > s=%q( Daniel Martin -- martin@snowplow.org > puts "s=%q(#{s})",s.map{|i|i}[1] ) > puts "s=%q(#{s})",s.map{|i|i}[1] > > ------=_Part_81916_18240031.1177308609315--