in reply to Re^5: EMail problem in outlook
in thread EMail problem in outlook

In this part of your code
open(FH,"file.txt"); while(<FH>) { $var = $_; print "$var\n"; } close(FH);
$var will only be set to the very last line of your file, not the whole file.
Replace $var = $_; with $var .= $_; so that it contains the whole file. Also add a line like my $var; before the while (<FH>) line.
Those lines should look like this:
open(FH,"file.txt"); my $var; while(<FH>) { $var .= $_; } close(FH);