use Email::Stuff; use IO::All; $body = 'this is a test'; # Create and send the email in one shot Email::Stuff->from ('brejen@comcast.net' ) ->to ('ailithir@yahoo.com' ) ->bcc ('slyder2412@hotmail.com' ) ->text_body($body ) ->attach (io('test.doc')->all, filename => 'test.doc') ->using ('SMTP', Host => 'smtp.mail.yahoo.com') ->send;