my $cmd = "mail -s 'Test' 'testmail\@server.com' < 'DailyReport_$d.txt'";