• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How can I get the email address of a Mail account?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I get the email address of a Mail account?


  • Subject: Re: How can I get the email address of a Mail account?
  • From: Brian Christmas <email@hidden>
  • Date: Tue, 29 Sep 2015 22:40:14 +1000

G’day Chris, and once more, a big THANK YOU.

Regards

Santa


On 29 Sep 2015, at 9:00 pm, Christopher Stone <email@hidden> wrote:

tell application "Mail"
  set inBoxList to name of every account whose enabled is true as list
  
  if (count of inBoxList) = 1 then
    set theAddRuleMailbox to item 1 of inBoxList

  else
    set theAddRuleMailbox to choose from list inBoxList ¬
      with prompt "Please choose an Account to which to add the Mail rule " & return & return & "\"Move to '* items to shift'\"." & return ¬
      with title "Mail Manager add Mail rule" OK button name ¬
      "Choose this Inbox Account" cancel button name ¬
      "I'll set the rule myself" default items {item 1 of inBoxList}
    
    if length of theAddRuleMailbox = 1 then set theAddRuleMailbox to item 1 of theAddRuleMailbox
    set accountEmailAddressList to email addresses of account theAddRuleMailbox
    if length of accountEmailAddressList = 1 then set accountAddress to item 1 of accountEmailAddressList
    
  end if
end tell


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >How can I get the email address of a Mail account? (From: Brian Christmas <email@hidden>)
 >Re: How can I get the email address of a Mail account? (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: Test of Mail Act-On Outgoing Rule
  • Next by Date: Re: tags manipulation
  • Previous by thread: Re: How can I get the email address of a Mail account?
  • Next by thread: Test of Mail Act-On Outgoing Rule
  • Index(es):
    • Date
    • Thread