LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 09-18-2014, 12:24 PM   #1
bachmanne
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
dayid
Member
 
Registered: Apr 2012
Location: Austin, TX
Posts: 44

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


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:05 AM.

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