LinuxQuestions.org
Register a domain and help support LQ
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 12-14-2012, 01:13 PM   #1
panks1910
LQ Newbie
 
Registered: Dec 2012
Location: Bangalore
Posts: 1

Rep: Reputation: Disabled
I m new to Linux ,need help to send mail with attachment via mail command Rhel 5.3


I m new to Linux ,need help to send a mail with attachment via mail command linux,Version is RHEL 4 & 5.3.
 
Old 12-14-2012, 01:56 PM   #2
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Are there any mail services running on your system? It should be running in order to send an email. Meanwhile, if it's running then you can send attachment as follow:
Code:
uuencode /path/to/file/ /path/to/file/ | mailx -s "<subject>" <recipient_mail_id>
For instance, if you want to send a file named /home/jack/sample.txt as an attachment to peter@somehost.com, use:
Code:
uuencode /home/jack/sample.txt /home/jack/sample.txt | mailx -s "Sample Test" peter@somehost.com

Last edited by shivaa; 12-14-2012 at 01:59 PM.
 
  


Reply


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
[SOLVED] Send attachment with mail from command line shivaa Linux - Newbie 8 12-07-2012 12:42 PM
can mail command be used to send mail onto global mail servers like yahoo etc dale_chip Linux - Newbie 4 08-12-2008 09:33 AM
Cannot send mail with mail() command in PHP 4.3.4, Apache 2.0.48, Mandrake Linux 10 arcanum Linux - General 3 06-27-2004 07:06 PM
mail -a would not work to send e-mail attachment saavik Linux - Networking 3 12-18-2003 10:33 AM


All times are GMT -5. The time now is 12:09 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration