The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Problem to send rtf inline body srik_ux UNIX for Dummies Questions & Answers 7 05-30-2008 08:30 AM
Send mail attachments and have a mail body shibajighosh AIX 1 04-18-2008 10:54 AM
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
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 06-29-2006
Registered User
 

Join Date: Jun 2006
Posts: 8
Stumble this Post!
Thumbs up How to send body in a mail

Hi,

How to send send body along with attachment in a mail
given below is code to send mail with attachemnt.its working fine
but i need to send some message as body of the mail.


uuencode /prod/applc/ds_data/mac/working/nullctry.csv "nullctry.csv" | mailx -s "List Of Attendance" RajendraP_Gora@abc.com.sg


Thanks in advance

Regards
Rajesh
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 06-29-2006
bhargav's Avatar
Registered User
 

Join Date: Sep 2004
Location: USA
Posts: 511
Stumble this Post!
try
Code:
mailx -s "List Of Attendance" RajendraP_Gora@abc.com.sg < abc.txt
Reply With Quote
  #3 (permalink)  
Old 06-29-2006
Registered User
 

Join Date: Jun 2006
Posts: 8
Stumble this Post!
Unhappy

Hi bargav,

this code works fine for message body

mailx -s "List Of Attendance" RajendraP_Gora@abc.com.sg < /prod/applc/ds_data/mac/working/Message.txt

and this is working fine fine for sending attachments

uuencode /prod/applc/ds_data/mac/working/nullctry.csv "nullctry.csv" | mailx -s "Status Report" RajendraP_Gora@abc.com.sg

the problem is while combining both i am not getting the expected result

i need message with body as well as attachment

for example this code is working fine till sending body but attachment is
embeded with some crap text

(cat /prod/applc/ds_data/mac/working/Message.txt; uuencode /prod/applc/ds_data/mac/working/nullctry.csv "nullctry.csv") | mailx -s "Status Report" RajendraP_Gora@abc.com.sg
Reply With Quote
  #4 (permalink)  
Old 06-29-2006
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,572
Stumble this Post!
this had been answered many times,
please search the forum

Code:
(echo "msg"; uuencode t t.txt) | mailx -s "sub" "abc@xyz.com"
Reply With Quote
  #5 (permalink)  
Old 06-29-2006
Registered User
 

Join Date: Jun 2006
Posts: 8
Stumble this Post!
Hi Madhan,

your code is fine if it is a single line message.

but my case message is like a comeplete letter with many lines and spaces
in between.

For example my message looks like

Hi,


This is sample body of the message.


Pls find the attached document.

The job has run Successfully.


Regards
Rajendra Gora
Reply With Quote
  #6 (permalink)  
Old 06-29-2006
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,572
Stumble this Post!
stil, whats the deal in that ?
Code:
(echo "`cat bodytext`"; uuencode t t.txt) | mailx -s "sub" "abc@xyz.com"
Reply With Quote
  #7 (permalink)  
Old 06-29-2006
Registered User
 

Join Date: Jun 2006
Posts: 8
Stumble this Post!
Hi Madhan,

Thanks a lot.it works fine
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 04:37 PM.


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

Content Relevant URLs by vBSEO 3.2.0