Originally Posted by pbxuser911
how can i add which email address it will display its coming from?
/usr/sbin/sendmail -f email@example.com firstname.lastname@example.org < 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.