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? |
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 |
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.
|
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. |
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
|
Re: sending mail via CLI
Quote:
-- or -- Do not use "cat somefile.txt > sendmail" That will just create a file named "sendmail". |
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 05:41 PM. |