From: Joel Pearson Date: 2013-03-11T03:17:02+09:00 Subject: Re: Question regarding automating some Outlook/IMAP and pdf parsing functions w/ ruby? In that case the 271st email in your inbox is an object which doesn't support SenderEmailAddress. Presumably some sort of out of office or server notification or something like that. I can't duplicate the error with my inbox but this addition might do it: if ( msg.Senderemailaddress =~ /@exampledomain.com$/i rescue false ) && Basically rescue should trigger if there's an error within that line, and returninf false from the expression would cause it to skip the "if" block. -- Posted via http://www.ruby-forum.com/.