Re: sendmail
Re: sendmail
- Subject: Re: sendmail
- From: Andrew Oliver <email@hidden>
- Date: Mon, 03 Feb 2003 09:56:32 -0800
Yes, except that if you run the mail command in a terminal window, you get
to type the message body - i.e. you interact with mail.
According to man mail:
>
Sending mail
>
To send a message to one or more people, mail can be invoked with argu-
>
ments which are the names of people to whom the mail will be sent. You
>
are then expected to type in your message, followed by an `control-D' at
>
the beginning of a line.
'do shell script' doesn't offer the ability to interact with the shell, so
you can invoke the mail utility, but there's no way to tell it what the
message is once you've called 'do shell script', or to send a Ctrl-D at the
end. Piping the message in was the only way I could find to do that.
At least not that I'm aware of. Love to be proved wrong. :)
Andrew
:)
On 2/3/03 5:45 AM, "Michael Grant" <email@hidden> wrote:
>
That looks like a good start. Now, UNIX is not supposed to care whether
>
input is from a file or from the keyboard, so it should be possible to
>
provide it via AppleScript as well....
>
>
Michael
>
>
On 2/2/03 5:35 PM, "Andrew Oliver" <email@hidden> wrote:
>
> Assuming you just want to send plain text and not attachments (which gets
>
> into all kinds of issues with MIME encoding, etc.), the following will work,
>
> assuming sendmail (or another MTA) is running on your machine.
>
>
>
> It pipes the contents of a file to the named recipient. I couldn't find a
>
> way of passing the message contents in the command line, but it's a simple
>
> matter to write the message to disk, mail it, then delete the temp file.
>
>
>
> do shell script "mail -s \"subject goes here\" email@hidden <
>
> /path/to/message"
_______________________________________________
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.
References: | |
| >Re: sendmail (From: Michael Grant <email@hidden>) |