hi All,
i am trying to send a mail from perl using mailx.
the script runs fine if i hard code the file path which is to be attached to the mail. but when i give a variable containing the path of the file , perl is not able to send the file.
ex:
system('uuencode /attach/test.txt test.txt | mailx -s "Control File" -r abc@mno.com xyz@mno.com');
in the above case the scripts works fine.
system('uuencode $file $file | mailx -s "Control File" -r abc@mno.com xyz@mno.com');
here $file contains the file path /attach/test.txt .
In this case the script sends a mail but then mail doesnt have the attachment.
Please advice.
Thanks,
Mahi