1. Run A command 2. Send output of the command to my email Below is the Script : #!C:/Perl/bin/perl.exe use Mail::Sendmail; my $to_list = 'sadari@travco.co.uk'; my $email = "\n\nThis email was generated automatically.\n"; my $MailFrom = "storageadmalerts\@travco.co.uk"; my $subject = "Storage Array pool Status"; my $cmd = qx(raidcom get pool); my $message = "$cmd"; %mail = ( To => $to_list, From => $MailFrom, Bcc => $bcc_list, Cc => $cc_list, Subject => $subject, Message => $message ); $mail{Smtp} = 'mailtest.gmail.com'; sendmail(%mail)