LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Sendmail Attachement Logic (https://www.linuxquestions.org/questions/programming-9/sendmail-attachement-logic-575310/)

narainhere 08-07-2007 06:08 AM

Sendmail Attachement Logic
 
Hi all,
I have a perl script like

`(unix2dos \"$report_file\" | uuencode \"temp.txt\")|mail.pl -t xx@yy.com -s \"Test mail subject\"`


The mail.pl is a script which uses sendmail to mail the file to the id's specified in the -t option in the command(here its xx@yy.com).
with subject as specified in -s option.

One interesting behavior I have noted is that ,after execution of this command the file has been mailed as an attachment with the specified subject and an empty mail body.

But If I am adding something to the body part,the mail doesn't contains the attachment.

Please throw some light on this type of behavior.My requirement is to mail the report as attachment and add some summary info in the body.


You may also help me out in deciphering the command
(unix2dos \"$report_file\" | uuencode \"temp.txt\")

and how the o/p of the command becomes the attachment in senmail

unSpawn 08-07-2007 11:27 AM

How about just using 'mpack' instead? It's all three of them commands rolled into one.


All times are GMT -5. The time now is 12:25 PM.