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 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 11:30 AM
Send mail attachments and have a mail body shibajighosh AIX 1 04-18-2008 01:54 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
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 06-29-2006
rajendragora rajendragora is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 8
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
  #2 (permalink)  
Old 06-30-2006
bhargav's Avatar
bhargav bhargav is offline Forum Advisor  
Registered User
  
 

Join Date: Sep 2004
Location: USA
Posts: 511
try
Code:
mailx -s "List Of Attendance" RajendraP_Gora@abc.com.sg < abc.txt
  #3 (permalink)  
Old 06-30-2006
rajendragora rajendragora is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 8
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
  #4 (permalink)  
Old 06-30-2006
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,952
this had been answered many times,
please search the forum

Code:
(echo "msg"; uuencode t t.txt) | mailx -s "sub" "abc@xyz.com"
  #5 (permalink)  
Old 06-30-2006
rajendragora rajendragora is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 8
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
  #6 (permalink)  
Old 06-30-2006
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,952
stil, whats the deal in that ?
Code:
(echo "`cat bodytext`"; uuencode t t.txt) | mailx -s "sub" "abc@xyz.com"
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 05:28 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