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 |
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-09-2005, 01:36 AM
|
#1
|
Member
Registered: Jan 2005
Location: Russia, Kazan
Distribution: Mandrake 10.2, RedHat sometimes..
Posts: 110
Rep:
|
sending mail via CLI
hello all!
i need to send a mail (one text file) from command line using sendmail. and also i do not want sendmail to stop and ask me to type a recipient or smth. else. i think this would look like "cat somefile.txt > sendmail 'and some options (recipient at least) i don't know' " what options should i use?
|
|
|
03-09-2005, 03:15 AM
|
#2
|
Member
Registered: Jul 2004
Location: Houston, Texas USA
Distribution: Linux Mint
Posts: 57
Rep:
|
If you just want to send text to someone from the shell just give a: mail -vs "subject" someone@someplace.com and hit enter.
then type your text. When you are finished, put a period by itself on the last line and hit enter. You will see it go through OR not.../peter
|
|
|
03-09-2005, 03:18 AM
|
#3
|
Member
Registered: Jul 2004
Location: Houston, Texas USA
Distribution: Linux Mint
Posts: 57
Rep:
|
I just reread your post. I'm not sure if you mean that you need to send someone a file or just a message. If you want to send an entire file, see : man nail.
|
|
|
03-09-2005, 05:26 AM
|
#4
|
Member
Registered: Jan 2005
Location: Russia, Kazan
Distribution: Mandrake 10.2, RedHat sometimes..
Posts: 110
Original Poster
Rep:
|
sorry, i didn't find nail on my system..
and you are right, i need not to type text, but use a prepared text file for it.
|
|
|
03-09-2005, 07:35 AM
|
#5
|
Member
Registered: Jul 2004
Location: Houston, Texas USA
Distribution: Linux Mint
Posts: 57
Rep:
|
Nail is a tiny program, why not just install it and save yourself allot of grief? If you give a 'man mail' does the manual page for mail or nail come up? /peter
|
|
|
03-09-2005, 12:33 PM
|
#6
|
Member
Registered: Jan 2005
Distribution: Solaris, Linux Fedora Core 6
Posts: 170
Rep:
|
Re: sending mail via CLI
Quote:
Originally posted by RomanG
hello all!
i need to send a mail (one text file) from command line using sendmail. and also i do not want sendmail to stop and ask me to type a recipient or smth. else. i think this would look like "cat somefile.txt > sendmail 'and some options (recipient at least) i don't know' " what options should i use?
|
Try:
-- or --
Do not use "cat somefile.txt > sendmail" That will just create a file named "sendmail".
|
|
|
03-10-2005, 12:06 AM
|
#7
|
Member
Registered: Jan 2005
Location: Russia, Kazan
Distribution: Mandrake 10.2, RedHat sometimes..
Posts: 110
Original Poster
Rep:
|
Many thanks to you wpn146. You helped a lot.
* Sometimes Google can't help, because I even don't know, the way/direction to search in..
Thank you again.
|
|
|
All times are GMT -5. The time now is 01:40 AM.
|
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
|
|