Re: Default Email App
Re: Default Email App
- Subject: Re: Default Email App
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 04 Aug 2005 13:06:41 -0700
- Thread-topic: Default Email App
Title: Re: Default Email App
On 8/4/05 12:23 PM, "Bruce Robertson" <email@hidden> wrote:
>> On 4-Aug-05, at 12:37 PM, Bruce Robertson wrote:
>>
>>> How do you determine the user's default email app? In the client's
>>> case it
>>> will only be Entourage or Mail.
>>
>> I think you'll need to parse the headers. Entourage appears to flag
>> itself in the User-Agent header, in your message that shows as "User-
>> Agent: Microsoft-Entourage/10.1.4.030702.0". Mail, appears to use
>> the "X-Mailer:" header, ie: "X-Mailer: Apple Mail (2.733)".
>
> Thanks, but I think you have misunderstood the question.
>
> The question is about the default mail application, not about the contents
> or sender-application of any particular message.
Somebody might know a 'do shell script' method to get at the system's default preferences.
Here's a workaround:
open location "mailto:email@hidden" --opens new message window in default email app
tell application "System Events" to set whichApp to name of first process whose frontmost is true
if whichApp = "Microsoft Entourage" then
using terms from application "Microsoft Entourage"
tell application whichApp
close window 1 saving no
--rest of script
end tell
end using terms from
else if whichApp = "Mail" then
using terms from application "Mail"
tell application whichApp
close window 1 saving no
--rest of script
end tell
end using terms from
else
beep
display dialog "You must have your default email application set to Microsoft Entourage or Mail." buttons {"Cancel"} with icon 0
end if
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden