> How to send mail with attachment in Unix | Unix Linux Forums | Shell Programming and Scripting

  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    
 
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: 17 May 2016, 12:58 PM EDT
Posts: 267
Thanks: 2
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: 17 May 2016, 12:58 PM EDT
Posts: 267
Thanks: 2
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: 15 July 2016, 7:44 AM EDT
Location: Bangalore
Posts: 159
Thanks: 35
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: 1 July 2016, 2:28 AM EDT
Posts: 3,066
Thanks: 34
Thanked 662 Times in 641 Posts
try with mutt command
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 05:09 PM.