• 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: Christopher Stone <email@hidden>
  • Date: Tue, 29 Sep 2015 06:00:12 -0500

On Sep 29, 2015, at 05:40, Brian Christmas <email@hidden> wrote:
So, I need, if possible, to retrieve the actual email address of that same account.
______________________________________________________________________

Hey Brian,

Something like this?

-------------------------------------------------------------------------------------------
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
-------------------------------------------------------------------------------------------

--
Take Care,
Chris

 _______________________________________________
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

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

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