Originally Posted by pbxuser911
how can i add which email address it will display its coming from?
/usr/sbin/sendmail -f firstname.lastname@example.org email@example.com < file
simple perl will do it..
my @body = `cat file.txt`;
open MAIL, "|/usr/sbin/sendmail -t user\@host.net\n" or die "cannot open sendmail program: $!\n";
print MAIL "From: user\@host.net\n";
print MAIL "Cc: user\@host.net\n";
print MAIL "Subject: subject\n";
print MAIL "\n";
print MAIL "@body\n";
file.txt can hold the contents of the email and be in the same directory as the script itself.