From: Daniel Berger Date: 2008-08-09T00:12:59+09:00 Subject: Re: Net::SMTP and Unknown User On Aug 7, 9:08 am, botp wrote: > On Thu, Aug 7, 2008 at 10:43 PM, Daniel Berger wrote: > > Problem: Sometimes people leave the company and their managers aren't > > always good about updating things. Since Net::SMTP#send_message seems > > to be an "all or nothing" method (i.e. either an email is sent to > > everyone or no email is sent to anyone), I'm not sure what to do about > > this situation. > > forgive me if i dont get you right, but why don't you send/route the > mails to a real mail server and/or a mailing list server? A mail > server has builtin routing/retry/timeout mechnisms and > understands/implems the full smtp protocol. I'm afraid I don't follow. Perhaps a bit of sample code will help: require 'net/smtp' mhost = 'mailgate.work.com' from = 'daniel.berger@work.com' # First email is valid, second one is not to = ['daniel.berger@work.com', 'foo.bar@work.com'] # Raises a Net::SMTPFatalError Net::SMTP.start(mhost, 25){ |smtp| smtp.send_message("hello", from, to) } If this is the wrong approach, I'm all ears. Thanks, Dan