The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Sending mail in the dead.letter file mjdavies UNIX for Dummies Questions & Answers 4 04-22-2008 11:36 PM
How to use "mail" to attach a file with an email? meili100 UNIX for Dummies Questions & Answers 2 02-23-2008 12:49 AM
How to attach a file & send mail thru script Mar1006 Shell Programming and Scripting 9 10-12-2006 05:54 AM
spooled file getting distorted when sending through unix mail chgopi UNIX for Dummies Questions & Answers 2 02-07-2006 12:26 PM
How to attach a file in mail? firebirdonfire UNIX for Dummies Questions & Answers 1 03-29-2001 04:38 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 01-09-2006
Registered User
 

Join Date: Jan 2006
Posts: 19
Need to attach a txt file while sending mail

Hi,

I need to attach a txt file while sending mail thru Unix.

Please help me out in this..

-Charan.
Reply With Quote
Forum Sponsor
  #2  
Old 01-09-2006
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,610
sending attachment had been answered many times,

could you please make use of the search facility:

search the forum
Reply With Quote
  #3  
Old 01-10-2006
Registered User
 

Join Date: Jan 2006
Posts: 19
I need to attach a txt file as well as embed some text in the mail body.

Thanks..

I need to attach a txt file as well as embed some text in the mail body.

How to add the mail body(Some text) while attaching a file like this :

uuencode abc.txt abc.txt | mailx -s "Attaching test" user@domain.com

Charan.
Reply With Quote
  #4  
Old 01-10-2006
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,610
Code:
uuencode abc.txt abc.txt | mailx -s "Attaching test" user@domain.com < your_file_containing_message 
Reply With Quote
  #5  
Old 01-10-2006
Registered User
 

Join Date: Jan 2006
Posts: 19
It Doesnt attach the txt file while embedding the mail body.

Madhan,

I tried this already..

uuencode abc.txt abc.txt | mailx -s "Attaching test" user@domain.com < your_file_containing_message

This is sending out a mail with the body of the "your_file_containing_message"
file.Doesnt attach the txt file.

Charan.
Reply With Quote
  #6  
Old 01-10-2006
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,610
I am very sure the above command would work as requested.

Could you please post the exact command what you had tried?

That would be helpful to find out the problem.
Reply With Quote
  #7  
Old 01-10-2006
Registered User
 

Join Date: Jan 2006
Posts: 19
I have used this..

uuencode datetime.txt datetime.txt | mailx -s "Attaching test" charan.p@igate.com < mail.txt

I am receiving the mail with the body of the "mail.txt" file.
I dont receive the attachment.

Charan.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
mailx, mailx attachment

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:01 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0