LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-29-2012, 03:15 AM   #16
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985

The uuencode is what makes the file an attachment, so if you mess with it after encoding it, it will no longer be taken to be an attachment.

Obviously uuencode doesn't understand Excel sheets, so you can compress the data *before* the uuencode.

gzip -9 SAC_Tire.xls
uuencode SAC_Tire.xls.gz SAC_Tire.xls.gz | mail -s "SAC Weekly Tire Report" Mailid@yahoo.com

that looks closer to me. can't test it here though.

Read the link chrism01 gave, that's useful.
 
Old 02-29-2012, 06:10 AM   #17
pnandak
LQ Newbie
 
Registered: Feb 2012
Posts: 18

Original Poster
Rep: Reputation: Disabled
Thanks for the support.Its working now.
Adding to that,
---------
uuencode SAC_Tire.xls.gz SAC_Tire.xls.gz > UCD_SAC_Tire.xls.gz

cat body-message.txt UCD_SAC_Tire.xls.gz > combined.txt
mailx -s "Test" -r "Automotive " `cat mailpcp1.dat` < combined.txt
------------------
ques:
1)how to keep To and CC mail ids - to the above code

2)in the Mailing list (i have client email id as well as some more email id- but the Mail id appears in alphabetical order..i wanted it to come as given in the .txt file -- is there any way)

Last edited by pnandak; 02-29-2012 at 06:14 AM.
 
Old 02-29-2012, 08:19 AM   #18
pnandak
LQ Newbie
 
Registered: Feb 2012
Posts: 18

Original Poster
Rep: Reputation: Disabled
Thanks for the support.Its working now.
Adding to that,
---------
uuencode SAC_Tire.xls.gz SAC_Tire.xls.gz > UCD_SAC_Tire.xls.gz

cat body-message.txt UCD_SAC_Tire.xls.gz > combined.txt
mailx -s "Test" -r "Automotive " `cat mailpcp1.dat` < combined.txt
------------------
ques:
1)how to keep To and CC mail ids - to the above code

2)in the Mailing list (i have client email id as well as some more email id- but the Mail id appears in alphabetical order..i wanted it to come as given in the .txt file -- is there any way)
 
Old 02-29-2012, 06:12 PM   #19
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,355

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Have you looked at the 2nd example in post #4 of that link; that's more the sort of thing you are asking I think
 
  


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
PHP: Send email with attachment and UTF8 in filenames Guttorm Programming 6 02-17-2012 04:27 PM
Email Attachment size limit madfed Linux - Server 4 06-21-2009 03:45 AM
How to send a html file as an file attachment to my mail from crontab? GRD Linux - Newbie 2 06-03-2008 11:39 AM
Script run by crontab won't send email Braynid Linux - Newbie 1 12-21-2007 12:16 AM
Send Email + Txt Attachment Using Cron Job beringer Linux - Newbie 3 01-31-2003 10:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:00 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