LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-18-2007, 08:51 AM   #1
km4hr
Member
 
Registered: Aug 2003
Posts: 39

Rep: Reputation: 15
how to send email with attachments from the command line


I'm reading the man page for "mail" but I don't see any provision for including attachments. Is there any tool for sending email with attachments from the command line. I'm using RedHat 5 (actually Centos 5).
 
Old 09-18-2007, 10:10 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Maybe uuenview is what you're looking for. Check the official homepage of the uudeview project here. An example of the usage is
Code:
uuenview -m $email -f "$from" -s "$subject" -a $file << EOF
email body here
EOF
where mail is sent to $email and has $file as an attachment. Test and enjoy!

Last edited by colucix; 09-18-2007 at 10:11 AM.
 
  


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
send email from command line djionel82 Programming 6 11-29-2005 12:12 AM
send email with mutt on command line naijaguy Linux - General 1 12-29-2004 06:33 PM
trying to send internet email from a command line...is it possible rutman Linux - Newbie 8 06-26-2004 02:19 AM
Can Pine send an email without from the command line without.. rutman Linux - Newbie 2 06-11-2004 04:34 PM
command line email with attachments??? crickett Linux - Software 1 06-24-2003 08:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:59 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
Open Source Consulting | Domain Registration