SMTP errror handling

When I try to send the email with invalid recipient like
bbbardan@wser.com I get following error 550 unknown recipient. I try
to catch the error with begin and catch but error is not caught.
Any idea

If you want to rescue an exception you need to use rescue, not
catch( which is something rather different in ruby)

Sorry I mean rescue but I type catch. My code is like this