I am trying to send an email from within Perl. I know the easy way to do this is to use MIME::Lite.
I do not have that option.
I typed:
mail -s 'TEST' myname@company.org < test.txt
at the prompt and the file test.txt was used in the body of the email plus the email was sent.
In Perl, I used
The process does create the email, but it gets an error.
The dead.letter in my home directory does contain the file.
I really want to use a variable from the program called $message_body rather than a file from the system.
It seems I am missing a command to close the editor that created the email.
Can somebody help me??
I do not have that option.
I typed:
mail -s 'TEST' myname@company.org < test.txt
at the prompt and the file test.txt was used in the body of the email plus the email was sent.
In Perl, I used
Code:
$rc=system("mail -s 'TEST' myname@company.org < test.txt");
The process does create the email, but it gets an error.
Code:
$ myname.org... User unknown
/home/myname/dead.letter... Saved message in /home/myname/dead.letter
The dead.letter in my home directory does contain the file.
I really want to use a variable from the program called $message_body rather than a file from the system.
It seems I am missing a command to close the editor that created the email.
Can somebody help me??