From: sto.mar@... Date: 2013-03-11T03:26:18+09:00 Subject: Re: Question regarding automating some Outlook/IMAP and pdf parsing functions w/ ruby? Am 10.03.2013 19:17, schrieb Joel Pearson: > 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. `rescue false' will rescue nearly all exceptions that might occur, which is a potentially dangerous thing. Better use a begin/rescue/end block. --