The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

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 04:01 PM
Command line/Script to send E-mail with HTML body and binary attachment G-Man AIX 3 04-18-2007 09:30 PM
AIX send mail with HTML message body and a binary attachment G-Man UNIX for Dummies Questions & Answers 4 03-22-2007 02:15 PM
Sending attachment thru a mail Rohini Vijay UNIX for Dummies Questions & Answers 1 05-12-2006 01:13 PM
Send Mail with attachment and a body manojram How do I send email? 4 04-26-2004 11:53 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-23-2006
guptan guptan is offline
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
  #2 (permalink)  
Old 05-23-2006
matrixmadhan matrixmadhan is online now Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,951
where is the decoded path name to be given to uuencode?

uuencode $PCFILE $PCFILE.decoded

search the forum
  #3 (permalink)  
Old 05-23-2006
guptan guptan is offline
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
  #4 (permalink)  
Old 05-23-2006
matrixmadhan matrixmadhan is online now Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,951
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
  #5 (permalink)  
Old 05-25-2006
guptan guptan is offline
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.
  #6 (permalink)  
Old 05-25-2006
Ygor's Avatar
Ygor Ygor is offline Forum Staff  
Moderator
  
 

Join Date: Oct 2003
Location: -31.96,115.84
Posts: 1,407
Did you look at the FAQs ?
  #7 (permalink)  
Old 05-25-2006
guptan guptan is offline
Registered User
  
 

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

Regards
Narayana Gupta
Closed Thread

Bookmarks

Tags
mailx, mailx attachment

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:57 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0