Unix/Linux Go Back    


Shell Programming and Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here.

How to send mail with attachment in Unix

Shell Programming and Scripting


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 04-03-2012
parthmittal2007 parthmittal2007 is offline
Banned
 
Join Date: Dec 2011
Last Activity: 5 March 2013, 1:31 AM EST
Posts: 193
Thanks: 22
Thanked 2 Times in 2 Posts
How to send mail with attachment in Unix

Hi All,
Is it possible to send mail in Unix with attachment.
If yes, then how??
Sponsored Links
    #2  
Old Unix and Linux 04-03-2012
bmk bmk is offline
Registered User
 
Join Date: Dec 2011
Last Activity: 31 October 2013, 9:16 AM EDT
Posts: 262
Thanks: 1
Thanked 22 Times in 22 Posts
Try like..


Code:
mail -s "hi"  test@gmail.com< test1.txt

Sponsored Links
    #3  
Old Unix and Linux 04-03-2012
parthmittal2007 parthmittal2007 is offline
Banned
 
Join Date: Dec 2011
Last Activity: 5 March 2013, 1:31 AM EST
Posts: 193
Thanks: 22
Thanked 2 Times in 2 Posts
But the file is not attached in this code
    #4  
Old Unix and Linux 04-03-2012
bmk bmk is offline
Registered User
 
Join Date: Dec 2011
Last Activity: 31 October 2013, 9:16 AM EDT
Posts: 262
Thanks: 1
Thanked 22 Times in 22 Posts
check test1.txt is the file...
Sponsored Links
    #5  
Old Unix and Linux 04-03-2012
parthmittal2007 parthmittal2007 is offline
Banned
 
Join Date: Dec 2011
Last Activity: 5 March 2013, 1:31 AM EST
Posts: 193
Thanks: 22
Thanked 2 Times in 2 Posts
That i know, But i want that when the mail should come it should contain the attached file.
Sponsored Links
    #6  
Old Unix and Linux 04-03-2012
nikhil jain nikhil jain is offline
Registered User
 
Join Date: Apr 2011
Last Activity: 19 February 2015, 9:04 PM EST
Location: Bangalore
Posts: 119
Thanks: 26
Thanked 2 Times in 2 Posts
This shul work

uuencode filename filename.txt | mailx -s " SUBJECT" -r nik@abc.com ram@abc.com
Sponsored Links
    #7  
Old Unix and Linux 04-03-2012
itkamaraj's Unix or Linux Image
itkamaraj itkamaraj is offline Forum Advisor  
^Kamaraj^
 
Join Date: Apr 2010
Last Activity: 4 April 2015, 12:03 PM EDT
Posts: 3,060
Thanks: 34
Thanked 660 Times in 639 Posts
try with mutt command
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to run a script using cron job and send the output as attachment via e-mail using unix vidhyaS Shell Programming and Scripting 8 06-09-2011 02:20 AM
send mail from AIX unix with multiple attachment rsivasan Shell Programming and Scripting 3 02-21-2011 07:24 AM
How to send html file in a mail not as an attachment but it should display in the mail in table for mani_isha UNIX for Dummies Questions & Answers 0 03-30-2010 03:37 AM
How to send a mail with attachment? albaalbetti Shell Programming and Scripting 4 11-19-2009 10:59 AM
how to send a attachment mail in unix mail2sant Shell Programming and Scripting 6 11-20-2008 01:02 AM



All times are GMT -4. The time now is 02:48 AM.