#!/usr/bin/perl use strict; use warnings; my $to ="recipent\@xyz.com"; my $cc = "copied\@xyz.com"; my $from = "noreply\@xyz.com"; my $subject = "You have got mail"; my $message = "Hello Admin\n\nHow are you doing today\n\nRegards,\n\Anonymous"; # send email using UNIX/Linux sendmail open(MAIL, "|/usr/sbin/sendmail -t"); ## Mail Header print MAIL "To: $to\n"; print MAIL "Cc: $cc\n"; print MAIL "From: $from\n"; print MAIL "Subject: $subject\n"; ## Mail Body print MAIL $message; # Close close(MAIL);