The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Attaching file and sending text in body using sendmail command!! sparan_peddu Shell Programming and Scripting 1 03-24-2008 12:01 PM
Command line/Script to send E-mail with HTML body and binary attachment G-Man AIX 3 04-18-2007 06:30 PM
AIX send mail with HTML message body and a binary attachment G-Man UNIX for Dummies Questions & Answers 4 03-22-2007 10:15 AM
Sending attachment thru a mail Rohini Vijay UNIX for Dummies Questions & Answers 1 05-12-2006 10:13 AM
Send Mail with attachment and a body manojram How do I send email? 4 04-26-2004 08:53 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-23-2006
Registered User
 

Join Date: Jun 2005
Posts: 19
sending mails with attachment and also some text in mail body

Hi,

Can some one help me with the syntax of the mailx that should send an attachment and also some text in the message body together.

When I am using the following syntax it is not sending the attachment but only the message body.

unix2dos -ascii $REPORTFILE | uuencode $PCFILE | mailx -s "hi" xyz@hotmail.com < note.txt

Where as REPORTFILE is the simple text file with .txt extn
PCFILE is converting the .txt into .XLS
note.txt contains the message that should be there in the message body

If I try with the following syntax it is sending the attachment without any thing in the message body.

unix2dos -ascii $REPORTFILE | uuencode $PCFILE | mailx -s "hi" xyz@hotmail.com

It is on SOLARIS

Regards
Narayana Gupta
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-23-2006
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,573
where is the decoded path name to be given to uuencode?

uuencode $PCFILE $PCFILE.decoded

search the forum
Reply With Quote
  #3 (permalink)  
Old 05-23-2006
Registered User
 

Join Date: Jun 2005
Posts: 19
The input for uuencode is 'unix2dos -ascii $REPORTFILE '
and the output is $PCFILE which is $REPORTFILE.xls
Reply With Quote
  #4 (permalink)  
Old 05-23-2006
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,573
Quote:
Originally Posted by guptan
The input for uuencode is 'unix2dos -ascii $REPORTFILE '
and the output is $PCFILE which is $REPORTFILE.xls
decode_pathname is must

man uuencode
Reply With Quote
  #5 (permalink)  
Old 05-25-2006
Registered User
 

Join Date: Jun 2005
Posts: 19
When I use this command

unix2dos -ascii $REPORTFILE | uuencode $PCFILE | mailx -s "hi" xyz@hotmail.com


it is working fine, it is sending the attachment but no message in the message body. I want to put some text in the message body also along with the attachment.
Reply With Quote
  #6 (permalink)  
Old 05-25-2006
Ygor's Avatar
Moderator
 

Join Date: Oct 2003
Location: -31.96,115.84
Posts: 1,243
Did you look at the FAQs ?
Reply With Quote
  #7 (permalink)  
Old 05-25-2006
Registered User
 

Join Date: Jun 2005
Posts: 19
Thanks for the reply, I will try with that.

Regards
Narayana Gupta
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
mailx, mailx attachment

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:32 PM.


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 Global Fact Book

Content Relevant URLs by vBSEO 3.2.0