Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Create Mail messages with attachments from Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create Mail messages with attachments from Terminal
Authored by: hypert on Oct 12, '04 01:20:16PM

This is a little off-topic from this script example, but doesn't anybody know an EASY way to enable command-line (terminal) mail? I'd love to be enable to compose a short email (not necessarily with attachment) and fire it off right from the terminal. I do this all the time in UNIX (Solaris), even though I don't receive mail there.

I'm afraid that I might need to install sendmail or something equally complex (and prone to attacks). Any other suggestions? I might take this combination shell-script/AppleScript, and use that as a base...

Hmmm.....



[ Reply to This | # ]
Create Mail messages with attachments from Terminal
Authored by: keith_veleba on Oct 12, '04 05:01:12PM

If you're running Panther, get Postfix Enabler http://www.roadstead.com/weblog/Tutorials/PostfixEnabler.html and start Postfix locally(it comes with Panther!)

Then, use the sendmail wrapper that comes with postfix:

Powerbook:~ velebak$ sendmail
From: <who@ami.com>
To: <who@areyou.com>
Subject: A quick message
A really quick message
.

Entering a '.' alone on a line tells sendmail/postfix to do it's thing.

Works for me all the time.

Enjoy!
Keith

keith dot veleba at nospam dot gmail dot com


---
-- If you hadn't stayed to read this sig, you'd be home by now.



[ Reply to This | # ]