open $CMD, "|/usr/bin/mailx -s \'$subject\' Alias\@xxxx.com" or die("Cannot open CMD"); print $CMD $message; close $CMD;