Unix/Linux Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

mailx with attachment

Solaris


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 04-24-2012
sridhardwh sridhardwh is offline
Registered User
 
Join Date: Apr 2012
Last Activity: 11 December 2012, 5:12 AM EST
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
mailx with attachment

Hi,
When i used below command, i am able to send mail


Code:
mailx -s "Testing mail working or not " babu.sudhakar@ymail.com"

but if i want send attachment with mail,which syntax i need to follow to send a file as attachment.

Last edited by joeyg; 05-01-2012 at 01:41 PM.. Reason: Please use CodeTags around commands & scripts
Sponsored Links
    #2  
Old Unix and Linux 05-01-2012
vikkash vikkash is offline
Registered User
 
Join Date: May 2012
Last Activity: 27 June 2012, 5:57 AM EDT
Location: Pune, India
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
try
Code:
uuencode "attachment file name"|mailx -s "Test mail" xyz@mail.com

It works for .csv files for me..Try and let me know as well Linux

Last edited by joeyg; 05-01-2012 at 01:42 PM.. Reason: CodeTags
Sponsored Links
    #3  
Old Unix and Linux 05-01-2012
gary_w's Unix or Linux Image
gary_w gary_w is offline
Registered User
 
Join Date: Oct 2010
Last Activity: 10 December 2014, 5:14 PM EST
Posts: 446
Thanks: 32
Thanked 96 Times in 88 Posts
This comes up all the time. Searching the site finds all kinds of examples.

Google Search Results for mailx attachment | The UNIX and Linux Forums
    #4  
Old Unix and Linux 05-05-2012
juan.brein juan.brein is offline
Registered User
 
Join Date: Apr 2012
Last Activity: 30 May 2012, 9:26 AM EDT
Posts: 53
Thanks: 0
Thanked 9 Times in 9 Posts
I had the same need time ago. I tried with mailx but it didn't work with a lot of files I wanted to send in an automated way. I finally installed mutt:

Look for in in sunfreeware
Si very very powerful
Sponsored Links
Closed Linux or Unix Question

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
mailx with -m attachment corrupted sankalpag HP-UX 5 02-22-2010 10:06 AM
Mailx: How to send a attachment using mailx command Sriram.Vedula53 Shell Programming and Scripting 3 02-19-2010 04:12 AM
Adding an attachment as an attachment to mailx guessingo Shell Programming and Scripting 2 09-23-2009 10:28 AM
Attachment getting corrupted using mailx Sandipan Shell Programming and Scripting 1 04-25-2007 06:35 AM
mail or mailx attachment brettmartin99 UNIX for Dummies Questions & Answers 3 03-07-2005 10:27 AM



All times are GMT -4. The time now is 09:41 PM.