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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-05-2003, 10:21 AM
|
#1
|
Member
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166
Rep:
|
command-line email sending
we need to be able to send an attachment to various email addresses through rsh remotely. What would be a command-line mail program/package/etc. that will send an email with an attachment to an email address without any user input.
example: 'rsh <server> <mail program> <attachment> <emailaddress>', and with just one command line the email is off and away. Any chance of this working? I don't mind what config is involved, we just need this to work.
|
|
|
03-05-2003, 01:12 PM
|
#2
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
well, you'll obviously have to do mime-encoding yourself,
but after that use sendmail...
Cheers,
Tink
|
|
|
03-05-2003, 01:43 PM
|
#3
|
Member
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166
Original Poster
Rep:
|
where should I read up on mime-encoding? What is it?! 
|
|
|
03-05-2003, 01:45 PM
|
#4
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
man -k mime :P
Cheers,
Tink
|
|
|
03-05-2003, 11:28 PM
|
#5
|
Senior Member
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,852
|
Re: command-line email sending
Quote:
Originally posted by ixion
we need to be able to send an attachment to various email addresses through rsh remotely. What would be a command-line mail program/package/etc. that will send an email with an attachment to an email address without any user input.
example: 'rsh <server> <mail program> <attachment> <emailaddress>', and with just one command line the email is off and away. Any chance of this working? I don't mind what config is involved, we just need this to work.
|
Mutt. It does attachments quite nicely.
Something like:
rsh server /usr/bin/mutt -s "Here's the stuff" -a attachment.file smithj@domain < /dev/null
should work. Dunno about that redirect working correctly with rsh, though. I can test it tomorrow (on a system that allows rsh). Let you know then.
Good luck...
Rick
|
|
|
03-06-2003, 11:16 AM
|
#6
|
Member
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166
Original Poster
Rep:
|
awesome! Thanks for the suggestion!
I'm anxious to see what you come up with 
|
|
|
03-06-2003, 06:14 PM
|
#7
|
Senior Member
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,852
|
Quote:
Originally posted by ixion
I'm anxious to see what you come up with
|
Worked like a charm... even the redirection from /dev/null.
Hope that'll help...
Rick
|
|
|
03-07-2003, 06:33 AM
|
#8
|
Member
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166
Original Poster
Rep:
|
Awesome!!! Thank you so much!!!
|
|
|
03-07-2003, 06:55 AM
|
#9
|
Member
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166
Original Poster
Rep:
|
I've been working with it on the Suse 8.0 server we have, but keep getting this error when using '/dev/null':
Error sending message, child exited 65 (Data format error.).
Could not send the message.
Is the Suse system not setup properly??
edit: /dev/null does exist 
Last edited by ixion; 03-07-2003 at 06:56 AM.
|
|
|
08-01-2008, 06:46 AM
|
#10
|
LQ Newbie
Registered: Jan 2008
Location: Sant Quinti de Mediona
Distribution: Gentoo
Posts: 25
Rep:
|
Quote:
Originally Posted by rnturn
Mutt. It does attachments quite nicely.
Something like:
rsh server /usr/bin/mutt -s "Here's the stuff" -a attachment.file smithj@domain < /dev/null
should work. Dunno about that redirect working correctly with rsh, though. I can test it tomorrow (on a system that allows rsh). Let you know then.
Good luck...
Rick
|
Thank you! this is what I was looking for 
[Well your solution was posted some years ago, but I just wanted to thank you  ]
|
|
|
All times are GMT -5. The time now is 12:04 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|