stinky emails

Nikolaus Gradwohl2008-06-23T06:14:00+00:00

Last week a college came up with the theory, that nobody would have mails lying around in his inbox, if they would start to stink after a while. To check this, i came up with the "email-stinky-o-mat" i already have hacked together a small ruby script that calculates the "stinkycount" for a mailbox.

require 'net/imap'
require 'date'

imap ='mailhost')
imap.login( 'user', 'password') "INBOX" )
stinkycount = 0["BEFORE", "#{( "%d-%b-%Y" )}" ]).each do |message_id|
stinkycount += 1
puts "#{stinkycount} stinking messages found"

this count can now be sent to a microcontroller (an arduino for example) which starts a fan, that is standing next to a reservior containing someting stinky - et voila (imagine drum roll here) - emails start to stink after 20 days :-)

read more ...