How to send body in a mail | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


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 !!

How to send body in a mail

UNIX for Dummies Questions & Answers


Tags
mailx, mailx attachment

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-30-2006
rajendragora rajendragora is offline
Registered User
 
Join Date: Jun 2006
Last Activity: 4 April 2007, 5:49 AM EDT
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
MySQL 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
Sponsored Links
    #2  
Old 06-30-2006
bhargav's Avatar
bhargav bhargav is offline Forum Advisor  
Registered User
 
Join Date: Sep 2004
Last Activity: 26 July 2012, 3:38 PM EDT
Location: USA
Posts: 512
Thanks: 0
Thanked 2 Times in 2 Posts
try

Code:
mailx -s "List Of Attendance" RajendraP_Gora@abc.com.sg < abc.txt

Sponsored Links
    #3  
Old 06-30-2006
rajendragora rajendragora is offline
Registered User
 
Join Date: Jun 2006
Last Activity: 4 April 2007, 5:49 AM EDT
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Data

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  
Old 06-30-2006
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
 
Join Date: Mar 2005
Last Activity: 5 July 2014, 11:14 AM EDT
Location: classification algos
Posts: 3,203
Thanks: 19
Thanked 30 Times in 27 Posts
this had been answered many times,
please search the forum


Code:
(echo "msg"; uuencode t t.txt) | mailx -s "sub" "abc@xyz.com"

Sponsored Links
    #5  
Old 06-30-2006
rajendragora rajendragora is offline
Registered User
 
Join Date: Jun 2006
Last Activity: 4 April 2007, 5:49 AM EDT
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
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
Sponsored Links
    #6  
Old 06-30-2006
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
 
Join Date: Mar 2005
Last Activity: 5 July 2014, 11:14 AM EDT
Location: classification algos
Posts: 3,203
Thanks: 19
Thanked 30 Times in 27 Posts
stil, whats the deal in that ?

Code:
(echo "`cat bodytext`"; uuencode t t.txt) | mailx -s "sub" "abc@xyz.com"

Sponsored Links
    #7  
Old 06-30-2006
rajendragora rajendragora is offline
Registered User
 
Join Date: Jun 2006
Last Activity: 4 April 2007, 5:49 AM EDT
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Madhan,

Thanks a lot.it works fine
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
send attachment and body in one mail using mailx ashwin3086 Shell Programming and Scripting 4 06-24-2010 01:39 AM
How to send a mail with attachement as well as message Body..? psiva_arul Shell Programming and Scripting 1 07-09-2008 01:51 PM
Send mail attachments and have a mail body shibajighosh AIX 1 04-18-2008 02:54 PM
AIX send mail with HTML message body and a binary attachment G-Man UNIX for Dummies Questions & Answers 4 03-22-2007 03:15 PM
Send Mail with attachment and a body manojram How do I send email? 4 04-26-2004 12:53 PM



All times are GMT -4. The time now is 12:42 AM.