Automate New Mail Account for Exchange

I'm trying to create a applescript that will ask the user for the their password and then create their mail account.  I can get the username, name, and email address from their active directory record so no need to ask the user that.  The problem I'm running into, is that scripting for exchange seems almost not doable.  In the script that comes in /Library/Scripts they only work with .Mac, POP, and IMAP types, but no exchange. 
The funny part is that when a new user goes into mail the first time, just by giving the username, email address, and password it can autodiscover everything it needs and set up the account.  So is there a way for applescript to tell mail these pieces of information and then tell it to autodiscover the account?
Is there a way to do this using a bash script? 

Mail.app crashes while setting up an Exchange Account

Similar Messages

  • How to create a new Mail account for Google Enterprise Gmail

    I have just set up Google Enterprise Business Apps, including Gmail.  Works just fine with my domain from iPhone and from Google Web App.
    I have set up a new Mac Mail account and can receive email addressed to my my domain and not gmail.com just fine but when I send mail the FROM: field has [email protected] instead of mydomain name. 
    I've tried getting help from Google but it's a slow, somewhat trying process.
    Any solutions?
    Thanks,  Donald

    NamibGuy wrote:
    Ok thanks I see the gear!
    I checked and the return address (from:) is already correctly set up.
    The Google Enterprise Gmail works just fine with my iPhone and from the Google web app.  PC with Outlook fine too.  I suspect that there must be something about the MAC Mail account setup.
    I just don't know where to look...
    If that is your issue then
    In Mac Mail>>Preferences>Accounts>>Account Information
    You can add  "from" options by adding them to email address line, seperate by comma.
    This will give you a "drop-down" menu in composing new mail or replying.

  • Created new email account for Exchange sync - Won't Sync old mail

    I upgraded to 2.0 on an old iPhone. could not get the PUSH to work on my original exchange account setup on the iphone. Created a new email/exchange account on the phone that offered a totally different setup screen and different required info. PUSH now works but will only download 10-15 emails that were previously synced and won't download any old subfolder mail. I have it set to download the last 200 emails. Help!

    Exchange accounts have a setting for the number of days to sync. Look in Settings > Mail, Contacts and Calendars > (your account name) > Mail days to sync. This overrides the setting of the number of emails to download. This is on p. 111 of User's Guide.

  • Windows 8.1, Surface Pro, 2 Outlook 2013 32bit - when attempting to set up new mail account with exchange 365 - "An encrypted connection to your mail server is unavailable"

    It then tells me to "Click Next to attempt using an unencrypted connection".
    I then follow the prompts but to no avail.
    Please help me!? Everything works fine on my personal windows 7 laptop - but not on my new work owned Surface Pro 2!

    Hi,
    According to your description, your office 365 account cannot be configured on your Surface Pro while it can work on your Windows 7 client.
    Maybe we can try to manually configure it. and you can also use network monitor to find the root cause.
    However, since the issue is related to Exchange online(Office 365), I recommend you ask for more professional help on our Exchange online forum:
    http://social.technet.microsoft.com/Forums/msonline/en-US/home?forum=onlineservicesexchange
    If you have any question, please feel free to let me know.
    Thanks,
    Angela Shi
    TechNet Community Support

  • All new mail accounts fail

    We are putting new mail accounts on an existing server, some users have accounts and we are adding new mail accounts for them in addition to their old accounts in the info section of the user account tab. Other new users are getting new mail accounts.
    Problem...
    All new mail accounts are not setting up correctly you cannot connect and also any mail delivered to the accounts comes back as user not found.
    I have checked the Admin > Server > Access > Allow all users and groups
    The logs look like this...
    Oct 6 09:46:36 mail postfix/smtpd[1208]: NOQUEUE: reject: RCPT from mail.*******.org.uk[**.**.**.**]: 550 <pete@******.co.uk>: Recipient address rejected: User unknown in local recipient table; from=<support@*******.co.uk> to=<pete@******.co.uk> proto=ESMTP helo=<mail.******.org.uk>
    Oct 6 09:46:36 mail postfix/smtpd[1208]: disconnect from mail.*******.org.uk[**.**.**.**]

    Any Idea's anyone ?

  • When opening my Outlook 2010 with new added e-mail account with Exchange Server, I have to click manually on my standard e-mail account for checking mail

    When opening my Outlook 2010 with new added e-mail account with Exchange Server supplied by my employer, I have to click manually on my standard e-mail account for checking mail. Do I have to upgrade my Microsoft Office 2010 or how can I make my Outlook
    2010 check all my four e-mail accounts without manually click on my accounts?
    Sincerely
    Ketil Hothorp

    Hello Ketil,
    Good Day...
    Seems to be the Issue is Syncing emails, now I would recommend you to Remove and Add the Account and try and check if the emails are getting synced automatically.
    Hope this is with Single User. If it is with Multiple Users then we need to check the permissions assigned.
    Regards,
    Praveen

  • In the new mail app for OSX v10.7 Lion it seems I can only setup my gmail account as an "imap", when I need to set it up as "pop"... PLZ HELP I NEED MY MAIL TO WORK!!!

    In the new mail app for OSX v10.7 Lion it seems I can only setup my gmail account as an "imap", when I need to set it up as "pop"... PLZ HELP I NEED MY MAIL TO WORK!!!

    Go to System prefs
    Select Mail Contacts and Calendars
    Then select Other
    Then select "Add a Mail Account and click create
    Then go to google for the settings you need:
    First here for the settings online at gmail http://tinyurl.com/du3fu
    Then here for the setting in mail http://tinyurl.com/38fevm8
    These are instructions for Mail 4.0 but all of the necessary settings should be listed.

  • Cannot add new mail Account or iCal account

    When I try to add a new Mail account (press " + " on the Mail -> Preferences -> Account tab) it temporarily darkens but nothing happens. Pressing "+" in iCal -> Preferences -> Accounts does not have an effect either.
    Unlike in the case of other posters neither Mail nor iCal crashes. It just simply does not respond. At present I have two Mail accounts (created in an earlier version, probably Tiger) and no iCal account.
    So far I have tried the following:
    1) Press "Add account ..." in the File menue instead of pressing the "+" button. Result: No effect.
    2) Use disk utility to repair permissions. Result: No effect.
    3) Quit Mail; Move ~/Library/Mail, ~/Library/Mail Downloads, ~/Library/Preferences/com.apple.mail.plist to the Desktop; Restart the Computer; Open Mail. Result: New Mail folders are created in ~/Library, a new com.apple.mail.plist is created. My .me account information is automatically recognized but I still cannot create another account, even not my second account that worked before.
    4) Create a new user. Result: For the new user I can create at least 3 Mail accounts.
    Obviously there is something wrong with my current user account, though I am not aware of any other symptoms. Any ideas how this can be repaired?

    Try a reset. Hold the sleep/wake and home buttons together until you see the Apple logo and then release. This will not affect your data. The phone will reboot.

  • How do I set up a new mail account on my iMac?

    Hello everyone,
    I think I used to have a Mail account however I could not remember the password when I tried to turn it on. I decided to delete the account completely and to start again. How do I set up a new mail account with a new email address and a new password??
    I can see how you create a new mail account but it then asks for an email and password so that doesn't help. I really didn't think it would be a hassle!
    Thanks,
    W

    You first need to set up a new User Name and Password with your Internet Service Provider (ISP); that is, whoever provides you with Internet access, such as Comcast, AT&T, etc in the US.  Alternately you can go on the Internet and set up a new email Account with a new User Name and Password with a public company such as Google's "Gmail" or Microsoft's "Hotmail".  Once you have set up your new Account with them, THEN you enter that information into Apple's "Mail" for it to send and receive emails for your new outside Account.
    Hope this helps

  • How do I stop Thunderbird from creating additional folders when I add a new mail account?

    I've been using Thunderbird for about 8 years now, migrating the configuration from version to version. Currently I have two accounts it picks up email from. I want to add a third account but everytime I do this, it creates a bunch of new folders with the name of the account in my folder tree. This is undesirable, mainly because it looks terrible and it's also dodging the default filtering I have set up globally for received messages.
    How do I create a new mail account without it making new folders and just using the local folders like the other accounts already do?
    I do not use Thunderbird's internal spam filtering, I use popfile and use message filters to sort the emails by headers Popfile adds to my messages. I do not understand why it won't let me make a new account like the other accounts without making a special folder for the new account. Please help?

    Item 1. Global inbox only works with POP mail accounts.
    Tools menu > account settings >server Settings > advanced and select use global inbox to turn it on. Note the folder will disappear, so move the mail you want from them before you change the settings.
    Item 2. IMAP accounts must have their own folders. The View menu > folder > unified view was designed to overcome that as much as possible,

  • I started with one itunes account for my iphone and ipad, and now have a second ipad linked to the same itunes.  Can I set up a new itunes account for one ipad without losing what has already been downloaded on it?

    I started with one itunes account for my iphone and ipad, and now have a second ipad linked to the same itunes.  Can I set up a new itunes account for one ipad without losing what has already been downloaded on it?  I want to stop my husbands downloads appearing on my ipad, and vice versa.

    A much simpler solution would be to go into Settings > Store and turn off Automatic Downloads

  • How do I get a new icloud account for my phone when it was setup with my wifes account?

    How do I get a new icloud account for my phone when it was setup with my wifes account?

    Go to Settings>iCloud and sign out. Any synced data, such as calendars and contacts, will be removed.
    To get a new ID: go to http://appleid.apple.com and create a new ID - you will need a different non-Apple email address from any ID you already have.
    Then go back to Settings>iCloud and sign in there, enabling any data types you want to sync in the list there. You will be asked to create a new @icloud.com address when enabling Mail.

  • Why can't I use my normal mail account for synching notes

    Hi there,
    I maintain my father's iDevices/computers as he has Parkinsons and does not understand the technology behind how these services work. I need to maintain as simple a configuration as possible. As an example calendaring is difficult as new entries are not necessarily put in the calendar he uses and I have to talk him through how to show all calendars on a regular basis. I can't have his mail on IMAP as he cannot manage his mail and his mailbox fills up. I can't simply pay for storage ad infinitum - my local copy of his mail is about 6 GB and growing.
    I have seen several discussions where it is clear that we *must* use an icloud.com e-mail account for synching notes via IMAP, but none of them have explained WHY I MUST USE @icloud.com e-mail. If this is an IMAP based service why can't I use any other IMAP server
    I see that it is referred to as an "icloud account" but if I have to enable mail, it becomes an e-mail account, which I do not want as it will be confusing if there is an issue with the main mail server (which I maintain) it will present an option to use the icloud.com e-mail as a valid option to send the mail.
    I do not turn on the mail option in icloud.. (only calendar, contacts, reminders and find my iphone). I find it dissapointing that this is now what seems to be a "requirement".

    thecpat wrote:
    WHY I MUST USE @icloud.com e-mail. If this is an IMAP based service why can't I use any other IMAP server
    That is absolutely unnecessary, but more convenient to have icloud to sync your notes. I use other IMAPs as well and can sync my notes with google and yahoo and icloud(corresponding email is required in all cases). It is your choice and you can pick your poison, but you will find out that icloud is more convenient after you or him will lose his info few times. There is no requirement, you can even use the group that will not sync with anything "on my device" if you disable all of IMAPS. Icloud is just the one that you can call Apple and normally people prefer to work with Apple support way more then with google's or yahoo's, but that is again up to your preference.

  • STRANGE PROBLEM with "Create New Mail Account.scpt" when creating POP acct.

    I am using "Create New Mail Account.scpt" to create a POP account. It creates the account successfully. It fetches the mails successfully. Now the problem begins. After fetching all the mails once if u click "Get Mail" in mac mail, it fetches all the emails again and has now 1 original and 1 copy of the email set which is on the server. I just need 1 copy of the mail set not multiple. Please give me a solution or direct me to a help.
    Thanks
    SCRIPT
    global theUsername
    global thePassword
    set success to 1
    set theResult to true
    if theResult is not equal to false
    #set theAccountName to getAccountName()
    #set theUsername to getUsername()
    #set thePassword to getPassword()
    #set theEmailAddresses to getEmailAddress()
    #set theFullName to getFullName()
    -- POP Account
    if accountTypeString is equal to "POP" or accountTypeString is equal to "IMAP" then
    set theHostname to "THE HOST NAME"
    -- POP specific options
    if accountTypeString is equal to "POP" then
    set deletionPolicy to my getDeletionPolicy()
    if deletionPolicy is not equal to false then
    set deletionPolicy to item 1 of deletionPolicy
    set theNewAccount to my createAccount(accountTypeString, theAccountName, theUsername, theHostname, thePassword, theEmailAddresses, theFullName)
    if theNewAccount is not equal to false then
    setDeletionPolicy(theNewAccount, deletionPolicy)
    getAndSetAuthenticationScheme(accountTypeString, theNewAccount)
    getAndSetSMTPServer(theNewAccount)
    else
    set success to 0
    end if
    end if
    -- IMAP specific options
    else if accountTypeString is equal to "IMAP" then
    set theNewAccount to my createAccount(accountTypeString, theAccountName, theUsername, theHostname, thePassword, theEmailAddresses, theFullName)
    if theNewAccount is not equal to false then
    getAndSetCachingSettings(theNewAccount)
    getAndSetAuthenticationScheme(accountTypeString, theNewAccount)
    getAndSetSMTPServer(theNewAccount)
    else
    set success to 0
    end if
    end if
    end if
    if success is equal to 1 then
    display dialog "Account created!"
    else
    display dialog "Account creation failed!"
    end if
    end if
    -- Convenience handler for creating accounts
    on createAccount(theAccountType, theAccountName, theUsername, theHostname, thePassword, theEmailAddresses, theFullName)
    tell application "Mail"
    try
    if theAccountType is equal to ".Mac" then
    set theNewAccount to make new Mac account with properties {name:theAccountName, user name:theUsername, server name:theHostname, password:thePassword, full name:theFullName, email addresses:{theEmailAddresses}}
    else if theAccountType is equal to "IMAP" then
    set theNewAccount to make new imap account with properties {name:theAccountName, user name:theUsername, server name:theHostname, password:thePassword, uses ssl:true, full name:theFullName, email addresses:{theEmailAddresses}}
    else if theAccountType is equal to "POP" then
    set theNewAccount to make new pop account with properties {name:theAccountName, user name:theUsername, server name:theHostname, include when getting new mail:true, password:thePassword, uses ssl:true, full name:theFullName, email addresses:{theEmailAddresses}}
    end if
    on error
    set theNewAccount to false
    end try
    end tell
    return theNewAccount
    end createAccount
    -- Ask the user what they would like to name the account
    on getAccountName()
    repeat
    set theResult to display dialog "What would you like this account to be named?" default answer "Example: My Home Account"
    set theAccountName to text returned of theResult
    if theAccountName does not start with "Example:" then
    exit repeat
    end if
    end repeat
    return theAccountName
    end getAccountName
    -- Ask the user for the user name for their email account
    on getUsername()
    repeat
    set theResult to display dialog "What is your email user name?" default answer "Example: janedoe"
    set theUsername to text returned of the theResult
    if theUsername does not start with "Example:" then
    exit repeat
    end if
    end repeat
    return theUsername
    end getUsername
    -- Ask the user for the password for their email account
    on getPassword()
    set theResult to display dialog "What is the password for this account?" default answer ""
    set thePassword to text returned of theResult
    return thePassword
    end getPassword
    -- Ask the user for the email addresses for their email account
    on getEmailAddress()
    repeat
    set theResult to display dialog "What email address would you like to use for this account?" default answer "Example: [email protected]"
    set theEmailAddress to text returned of theResult
    if theEmailAddress does not start with "Example:" then
    exit repeat
    end if
    end repeat
    return theEmailAddress
    end getEmailAddress
    -- Ask the user for the full name for their email account
    on getFullName()
    repeat
    set theResult to display dialog "What is the full name for this account?" default answer "Example: Steve Smith"
    set theFullName to text returned of theResult
    if (theFullName does not start with "Example:") then
    exit repeat
    end if
    end repeat
    return theFullName
    end getFullName
    -- Convenience handler for asking the user what settings they would
    -- like to have for their special mailboxes. This handler also sets these
    -- values in Mail.
    on getAndSetSpecialMailboxes(theAccount)
    -- Sent messages default to storing locally
    set theResult to display dialog "Would you like to store Sent Messages on the IMAP server?" buttons {"Yes", "No"} default button 2
    log theAccount
    tell application "Mail"
    tell theAccount
    if button returned of theResult is equal to "Yes" then
    set store sent messages on server to true
    else if button returned of theResult is equal to "No" then
    set store sent messages on server to false
    end if
    end tell
    end tell
    -- Drafts default to storing locally
    set theResult to display dialog "Would you like to store Drafts on the IMAP server?" buttons {"Yes", "No"} default button 2
    tell application "Mail"
    tell theAccount
    if button returned of theResult is equal to "Yes" then
    set store drafts on server to true
    else if button returned of theResult is equal to "No" then
    set store drafts on server to false
    end if
    end tell
    end tell
    -- Trash defaults to storing on the IMAP server
    set theResult to display dialog "Would you like to store Deleted Messages on the IMAP server?" buttons {"Yes", "No"} default button 1
    tell application "Mail"
    tell theAccount
    if button returned of theResult is equal to "Yes" then
    set store deleted messages on server to true
    else if button returned of theResult is equal to "No" then
    set store deleted messages on server to false
    end if
    end tell
    end tell
    end getAndSetSpecialMailboxes
    -- Convenience handler for asking the user what IMAP
    -- caching setting they would like to use and configuring
    -- it in Mail.
    on getAndSetCachingSettings(theAccount)
    set theResult to choose from list {"Cache everything", "Cache everything but attachments", "Cache when read", "Don't cache"} ¬
    with prompt "Choose a message caching setting for this account:" default items {"Cache everything"} without multiple selections allowed
    if theResult is not equal to false then
    tell application "Mail"
    tell theAccount
    if (item 1 of theResult is equal to "Cache everything") then
    set message caching to all messages and their attachments
    else if (item 1 of theResult is equal to "Cache everything but attachments") then
    set message caching to all messages but omit attachments
    else if (item 1 of theResult is equal to "Cache when read") then
    set message caching to only messages I have read
    else if (item 1 of theResult is equal to "Don't cache") then
    set message caching to do not keep copies of any messages
    end if
    end tell
    end tell
    end if
    end getAndSetCachingSettings
    -- Convenience handler for asking the user whether they want to use
    -- an already defined SMTP server (if any) or whether they want to
    -- define a new one.
    on getAndSetSMTPServer(theAccount)
    tell application "Mail" to set everySMTPServer to every smtp server
    if ((count of everySMTPServer) > 0) then
    set listOfSMTPServers to {}
    repeat with eachServer in everySMTPServer
    try
    set listOfSMTPServers to listOfSMTPServers & name of eachServer
    end try
    end repeat
    createNewSMTPServer(theAccount)
    else
    createNewSMTPServer(theAccount)
    end if
    end getAndSetSMTPServer
    -- Handler for creating a new SMTP server, if the user has none set up
    -- already or if they choose not to use one of their existing servers.
    on createNewSMTPServer(theAccount)
    set theServerName to "THE SERVER NAME"
    tell application "Mail"
    set theSMTPServer to make new smtp server with properties {server name:theServerName, port:25, uses ssl:true}
    set smtp server of theAccount to theSMTPServer
    end tell
    getAndSetAuthenticationScheme("SMTP", theSMTPServer)
    end createNewSMTPServer
    -- Handler for asking the user what authentication scheme their server supports.
    -- The options are different for POP, IMAP, and SMTP. Unless you are told otherwise,
    -- it's best to leave these at their default settings.
    on getAndSetAuthenticationScheme(accountType, theAccount)
    if accountType is equal to "POP" then
    set theChoices to {"Password", "Kerberos 4", "Kerberos 5", "KPOP", "MD5"}
    set theDefault to {"Password"}
    else if accountType is equal to "IMAP" then
    set theChoices to {"Password", "Kerberos 4", "Kerberos 5", "MD5"}
    set theDefault to {"Password"}
    else if accountType is equal to "SMTP" then
    set theChoices to {"None", "Password", "Kerberos 4", "Kerberos 5", "MD5"}
    set theDefault to {"Password"}
    end if
    set theResult to choose from list theChoices ¬
    with prompt ¬
    "Choose an authentication scheme for this " & accountType & " server. Most servers support 'Password' authentication." default items theDefault without multiple selections allowed
    if theResult is not equal to false then
    tell application "Mail"
    set theScheme to item 1 of theResult
    tell theAccount
    if theScheme is equal to "Password" then
    set authentication to password
    else if theScheme is equal to "Kerberos 4" then
    set authentication to «constant exutaxk4»
    else if theScheme is equal to "Kerberos 5" then
    set authentication to kerberos 5
    else if theScheme is equal to "MD5" then
    set authentication to md5
    else if theScheme is equal to "None" then
    set authentication to none
    else if theScheme is equal to "KPOP" then
    set authentication to «constant exutakpo»
    end if
    end tell
    end tell
    if accountType is equal to "SMTP" then
    set theSMTPLogin to theUsername
    set theSMTPPassword to thePassword
    tell application "Mail"
    tell theAccount
    set user name to theSMTPLogin
    set password to theSMTPPassword
    set uses ssl to true
    set port to 25
    end tell
    end tell
    end if
    end if
    end getAndSetAuthenticationScheme
    -- Handler for asking the user what POP deletion policy
    -- they would like to use for their account.
    on getDeletionPolicy()
    set theResult to choose from list {"Immediately after being downloaded", "After a specified number of days", ¬
    "When I remove them from the inbox", "Always leave them on the server"} ¬
    with prompt ¬
    "Choose a POP message deletion option:" default items {"Always leave them on the server"} without multiple selections allowed
    return theResult
    end getDeletionPolicy
    -- Handler for setting the deletion policy established in getDeletionPolicy()
    on setDeletionPolicy(theAccount, thePolicy)
    tell application "Mail"
    tell theAccount
    if thePolicy is equal to "Immediately after being downloaded" then
    set delete mail on server to true
    set delayed message deletion interval to 0
    else if thePolicy is equal to "After a specified number of days" then
    set numberOfDays to my getDeletionInterval()
    set delete mail on server to true
    set delayed message deletion interval to numberOfDays
    else if thePolicy is equal to "When I remove them from the inbox" then
    set delete mail on server to true
    set delete messages when moved from inbox to true
    else if thePolicy is equal to "Always leave them on the server" then
    set delete mail on server to false
    end if
    end tell
    end tell
    end setDeletionPolicy
    -- Handler for asking the user what deletion interval they
    -- would like to use, if they are setting up a POP account
    on getDeletionInterval()
    set theResult to display dialog "After how many days would you like POP messages to be deleted from the server?" default answer "30"
    set numberOfDays to text returned of theResult as integer
    return numberOfDays
    end getDeletionInterval

    Hi amiaba, and a warm welcome to the forums!
    I can't quite tell what it's doing, but open Keychain Access in Applications>Utilities, click on your Keychain on the left, put .mac in the search bar, once you find it, double click on it and click show password.
    If you have no mail in there try this with Mail quit.
    Drag this file to the Desktop...
    /Users/YourUserName/Library/Preferences/com.apple.mail.plist
    Start Mail & see if it steps you through it.
    Not sure on the .uk thing, but is Date & Time>Time Zone set to the UK?

  • How to set a new email account for iCloud?

    How set a new email account for iCloud?

    There are two separate things you can do.
    You can add up to three 'email aliases' - these are additional addresses (not accounts) which deliver into the same inbox as the main account. (In fact it's a good idea to give out alias addresses, rather than the main address, because if they attract spam you can easily change them.) (New aliases can only be @icloud.com ones; @me.com addresses cannot now be created.)
    You should be aware before you start that once you've created an alias you cannot turn that address into a full iCloud account or move it to another account, and if it has @mac.com or @me.com versions these cannot be reinstated once deleted.
    More information on aliases here: http://help.apple.com/icloud/#mm6b1a490a
    Or if you want a completely separate account you will have to create a new iCloud account and sign into it in System Preferences>Mail, Contacts and Calendars. Note that any one device can create only three iCloud accounts.

Maybe you are looking for

  • Iphone 3.0 sdk download query?

    Is the iPhone 3.0 SDK download available for everyone or only for those who enroll from either of the programs?

  • How to debug module pool program

    Hi everybody, How to debug module pool program ,please send any material for module pool programming . Thanks & Regards, Siddivinesh.Jogu [email protected]

  • Missing trading partner in FI document while disburse loan

    Dear All, We have the problem about trading partner in FI document. Our client wants the system to fill trading partner while post loan disbursement (FN5V). We try to maintain trading partner field in Control Tab in Business partner master data. But,

  • Safari will not close

    Safari will not close even when I use command+Q. I cannot restart my computer because Safari is still open

  • Mail vs Thunderbird

    I was wondering if anyone out there could give me an idea of the benefit of moving my email from Thunderbird to Mail. Any ideas?