LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-07-2007, 06:08 AM   #1
narainhere
LQ Newbie
 
Registered: Jul 2007
Posts: 12

Rep: Reputation: 0
Question 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
 
Old 08-07-2007, 11:27 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
shared memory + GUI attachement hegdeshashi Linux - Networking 0 02-16-2007 12:55 AM
dd with logic volume ekdya Fedora 4 02-08-2007 03:42 AM
Open pdf-attachement in Evolution hyllplan Linux - Software 6 09-03-2005 01:38 PM
logic h/w Programming 8 01-02-2004 04:44 PM
logic design athenerx Programming 2 02-02-2002 06:24 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration