|
|
Replace /usr/bin/mail with Mail.app
Re: "everything else hangs after typing in the subject". It's supposed to hang. It's waiting for the message body on standard input. Type Ctrl-D to send end of file to the script.
As far as getting it to work with php. Have you tried running the script with sudo? You'll need to add NOPASSWD to /etc/sudoers. See
this hint. Run ---
Replace /usr/bin/mail with Mail.app
I don't like the sudoers thing... it opens my machine in a way I don't want...
sudo is fine grained
I see many people talk about 'risk' when using sudo with
NOPASSWD: and I agree, when applied broadly it is a little silly. However, sudo has very fine grained control over who can do what and as whom (either with or without a password).
Bad idea: Better idea: This allows This, IMO, certainly beats having scripts with passwords hardcoded into them in cleartext. See
Replace /usr/bin/mail with Mail.app
it should work this way:
Replace /usr/bin/mail with Mail.app
You could also try something like this script:
This works because root is allowed to sudo to any other user without a password. --- |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.10 seconds |
|