 |
 |
Send email from the terminal?
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Nov 2000
Location: Davis, CA, USA
Status:
Offline
|
|
I'm writing some super simple shell scripts, one of which relays the uptime of my OSX PB computer to my ICQ email addresss, which in turn, gets sent to my ICQ client.
Will Pine, or some similar email client fit my need for just a simple mail client that can send mail from the command prompt? All I need is something that can send mail to a specific address, and include a short message of just a line or two.
Thanks!
-THX
|
|
Just because Windows users vastly outnumber Mac users, numbers alone do not denote a higher form of life. Cøckroaches outnumber humans many times over, and no one says a cøckroach is better than a human.
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Oct 2000
Location: Portland, OR USA
Status:
Offline
|
|
You can use 'sendmail -t'. Simply pipe a message to it and it will take care of the rest. Don't forget to use the headers ('To:', 'Content-Type:', etc.). Additionally, there should be a mail (or Mail) command that you can use, though I prefer the control of writing my own headers with sendmail.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Nov 2000
Location: Davis, CA, USA
Status:
Offline
|
|
Duh I never thought of piping a message to sendmail.
Thanks!
-THX
------------------
Just because Windows users vastly outnumber Mac users, numbers alone do not denote a higher form of life. ****roaches outnumber humans many times over, and no one says a ****roach is better than a human.
|
|
Just because Windows users vastly outnumber Mac users, numbers alone do not denote a higher form of life. Cøckroaches outnumber humans many times over, and no one says a cøckroach is better than a human.
|
| |
|
|
|
 |
|
 |
|
scruffy
|
|
sendmail will probably work, I haven't tried it, but it's not designed to be used that way. The command that is more meant for sending mail from the terminal is just "mail"
mail -s {subject} someone@some.where < {file with message}
will read the message out of the file, or you can just type
mail -s {subject} someone@some.where
and hit return. then you can type the message one line at a time. When the message is done, send an end-of-file marker with control-D.
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Dec 2000
Status:
Offline
|
|
I donno... sendmail says it's supposed to be an interface for other programs to use, while mail is a [lousy] interface for humans.
Sendmail can do stuff you might want in an auto-mailer... like not allowing the message to bounce if it's not deliverable. That way if you can't reach the server, everything stays quiet instead of getting buried in error messages...
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|