Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-18-2014, 12:24 PM   #1
LQ Newbie
Registered: May 2012
Posts: 1

Rep: Reputation: Disabled
using mailx to send an attachment in Redhat 6

We are moving an application from Solaris to Linux Redhat 6. We used the following code to send an attachment using mailx. I was told Redhat 6 mailx had that functionality without using uuencode. Can someone tell me how to convert the current code to not use uuencode:

# mail attachment
cat $lv_attach \
| uuencode `basename $lv_attach` \
| mailx -s "$lv_subject" $lv_mailaddr 2>/dev/null

Thank you
Old 09-18-2014, 12:37 PM   #2
Registered: Apr 2012
Location: Austin, TX
Posts: 44

Rep: Reputation: Disabled
From the mailx manpage:
  -a file
              Attach the given file to the message.
 echo "Message contents" | mailx -s "Subject" -a "/path/to/file"
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Not able to send email through putty via mailx or sendmail command. kirandhobale Linux - Newbie 2 10-14-2013 11:42 AM
How to send mails using HTML format with mailx client ? shivaa Linux - Newbie 1 02-23-2013 02:04 AM
Using mailx to send to more than one person kaplan71 Linux - Software 1 12-12-2007 10:47 AM
Send excel attachment using sendmail cwseetoh Linux - Software 3 09-24-2004 01:29 PM
send mails with attachment ProXXXy Linux - Networking 2 08-18-2004 03:33 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:23 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration