Re: Sending Mail from shell script
Re: Sending Mail from shell script
- Subject: Re: Sending Mail from shell script
- From: "Simon Kornblith (Mailing Lists)" <email@hidden>
- Date: Tue, 04 Jun 2002 16:48:46 -0400
On 6/4/02 2:38 PM, "Nir Soffer" <email@hidden> wrote:
>
In a shell script or the terminal you can use:
>
mail -s "This is the subject line" email@hidden < "file that
>
contains the message body"
>
>
or:
>
echo "This is very short message body" | mail -s "This is the subject line"
>
email@hidden
>
>
You can get more information by:
>
man mail
This would be a good solution for anyone who doesn't need to send MIME
messages. The mail command, unfortunately, is too intelligent and (AFAIK)
won't let you specify the headers, so it won't send any MIME message (see my
correspondence with Paul Berkowitz for more).
In addition, "echo" won't let you send things of any substantial size,
although there are workarounds that allow piping data to stdin without
writing files.
Simon
--
They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety.
-- Benjamin Franklin, Letter to Josiah Quincy, Sept. 11, 1773.
Those who desire to give up freedom in order to gain security will not have,
nor do they deserve, either one.
-- President Thomas Jefferson
To those who scare peace-loving people with phantoms of lost liberty, my
message is this: your tactics only aid terrorists.
-- John Ashcroft
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.