Create Mail account by AppleScript - Authentication problem

Hi everyone,
For two day, I try to create a new email account in Apple Mail by using Apple Script. Actually, my script works fine except for the declaration of SMTP informations.
To my side, my SMTP server requires *authentication by password*.
----- CODE -----
tell application "Mail"
(* First, the IMAP account. Works flawlessly *)
try
set newacct to make new imap account with properties {name:"MailboxName", user name:"[email protected]", password:"", uses ssl:true, server name:"xxx.mycompany.com", port:xxx, full name:"<Sender User Name>", email addresses:{"[email protected]"}}
(* Next, we create a new SMTP server in the list. *)
set addsmtp to make new smtp server with properties {server name:"xxx.mycompany.com", user name:"[email protected]", uses ssl:true, authentication:password, password:""}
(* End then, we attach the SMTP server to the new IMAP account. *)
set smtp server of newacct to addsmtp
end try
end tell
----- END CODE -----
When I launch this script, Mail starts, the IMAP account is created just like the SMTP server. BUT when I check it (MailboxName > right click > Modify "MailboxName" > Sending server (SMTP) > modify the SMTP server list > advanced) there is *<Do not localize>* message instead of the SMTP scrolling list.
When I restart AppleMail, there is the list but only with "xxx.mycompany.com" instead of "xxx.mycompany.com:[email protected]".
I check the advanced properties of the new SMTP server and Authentication parameter is set to "None".
*I've tried "authentication:md5", it works !*
Does anyone have an idea ?
If you need further information, please let me know.
Regards,
Florent.
ps : I haven't found AppleScript forum. Sorry if this post is not in the right place

Hello Aric Friesen, hello ssh2,
first of all, thank you for replying on this thread
_I'll start with SSH2 :_
I've tried to change the property of IMAP account directly (while the creation) AND overloading it after declaration and it still not works.
Maybe this image is friendlier than text ^^
Of course, I also tried to put double-quote on ‘password‘, nothing changes.
Same if I remove ‘authentication:""‘ from SMTP creation and declare it after.
As you probably get, my English is not perfect so I may have misunderstood your post If you can post the code of your solution, that could be clearer for me.
_Now *Aric Friesen* :_
Indeed Mr Marshall seems to be an implicated and professional person. I haven't reply to his last mail because I was a bit upset. I'm very sorry about that, I apologize, sincerely.
In his last mail, he indicate me the process to sign up ADC for free and then the authentication web page worked. There is no "problem" anymore about that (well, there was never a problem in fact... shame on me !).
I'm going to wait for ssh2 reply before getting in bug reporting (and, at same time, thank Darin for his precious help !).
regards
Florent.
ps : Don't paid attention to "<SMTP Server Address>" in IMAP account creation, on the pic. It's a copy/paste mistake.

Similar Messages

  • Can't  create mail account for gmail

    Can't  create mail account for gmail in my new man pro 15 retina later 2013 ME294

    I'm having trouble settinng up my @mail.com account on mac's default mailing service. When i et to tthe incoming mail server part I'm lost. I don't know what to put.

  • HT201320 i get a pop up "this iphone is restricted from creating mail accounts" ??

    My new Iphone keeps popping up a message on my email "This Iphone is restricted from creating mail accounts" what canI do ?
    under setting is does not let me select the "add account" or "fetch new data".

    I had to completely disable all restrictions and then re-enable.  General>Allow Changes>Accounts>Don't Allow Changes created the issue.

  • New open directory account doesn't create mail account

    Hi All
         I have a Mac Mini with lion server, Fresh out of the box i messed with it a few times to learn and then i did a clean (internet) install and started with the settings i wanted (hostname, etc) with no mistakes. (It seems Lion doesn't like applhying most changes)
    When i set it up i created one local admin user that won't be in the open directory.
    Anyway, I've set up the following :
    * Address Book
    * File Sharing
    * iCal
    * Mail
    * Profile Manager
    * and VPN
    The first open directory user i added was myself and that user managed to get assigned an email account.
    Susiquent users i've added have not been registered with the mail subsystem.
    I've checked this using the "Server Admin" additional download management tool. (Mail service on the left, Maintenance up the top and then accounts uder that)
    There is only one mail account and thats the first one i've added.
    I havn't played with the settings so other than switching things on it should "just work" but it doesn't.
    I've prevously setup vmail servers using mysql to store the accounts with postfix and courioer imap but that was in some ways simpler as nothing was under the covers. I havn't dug too much into the dovecot config files, etc as i believe there is an all knowing server configuration engine at work here that isn't doing its job (which i havn't dug into)
    Has anyone had this issue of the mail accounts not being created?
    Or can anyone point me to a fix?

    It seems to have something to do with profile manager.
    I get stack traces in the "system messages" logs for the "Server" application, grrrr.
    I'll get that info and attempt to submit a but report tonight.

  • Can't create mail account

    Every time I try and create a mail account I get this message: Logging in to mail server “plus.pop.mail.yahoo.com” failed. This server may require an additional fee for Yahoo! POP access. For more information, visit Yahoo! Mail Plus. If you continue, you might not be able to receive messages.
    why do i keep getting this message? why won't it connect?

    I'm having trouble settinng up my @mail.com account on mac's default mailing service. When i et to tthe incoming mail server part I'm lost. I don't know what to put.

  • I can receive emails but can't send them. Auto set up created mail account separate from account migrated from a PC. Migrated account receives but doesn't send; other account didn't work

    Phoned internet provider, TPG & talked through resetting passwords then the migrated email temporarily allowed emails to send, then quit again, but still receives emails.
    Why will my Mac receive emails but not send them? The mails settings for POP & SMTP are same.
    Closed the original mail account on the PC but didn't help - had to reopen it to send this email.
    Detail from Mail Connection Doctor on my MacBook Pro, under WROTE says:
    VIDL 437,
    then later quits.
    Is this relevant? Does this mean anything?
    I'm a bit technically challenged.Good at Adobe software but not mail, internet or hardware.  Has anyone fixed a similar problem?
    Theger.

    Phoned internet provider, TPG & talked through resetting passwords then the migrated email temporarily allowed emails to send, then quit again, but still receives emails.
    Why will my Mac receive emails but not send them? The mails settings for POP & SMTP are same.
    Closed the original mail account on the PC but didn't help - had to reopen it to send this email.
    Detail from Mail Connection Doctor on my MacBook Pro, under WROTE says:
    VIDL 437,
    then later quits.
    Is this relevant? Does this mean anything?
    I'm a bit technically challenged.Good at Adobe software but not mail, internet or hardware.  Has anyone fixed a similar problem?
    Theger.

  • I can not create Mail Account..

    I am trying to create a mail account in X Server 10.5.
    I created an account in Workgroup Manager and enabled the mail service for the user, but for some reason, the user and password keeps rejecting...
    Any thoughts? I've been trying to figure this out for a while....

    Tony,
    Sorry. My server is not configured as advanced.
    Here is the postconf result
    config_directory = /etc/postfix
    content_filter = smtp-amavis:[127.0.0.1]:10024
    daemon_directory = /usr/libexec/postfix
    debugpeerlevel = 2
    enableserveroptions = yes
    html_directory = no
    inet_interfaces = all
    mail_owner = _postfix
    mailbox_transport = cyrus
    mailq_path = /usr/bin/mailq
    manpage_directory = /usr/share/man
    messagesizelimit = 10485760
    mydestination = $myhostname,localhost.$mydomain,localhost,mail.mydomain.com
    mydomain = mydomain.com
    mydomain_fallback = localhost
    myhostname = mail.mydomain.com
    mynetworks = 127.0.0.0/8,192.168.2.0/24
    newaliases_path = /usr/bin/newaliases
    queue_directory = /private/var/spool/postfix
    readme_directory = /usr/share/doc/postfix
    relayhost =
    sample_directory = /usr/share/doc/postfix/examples
    sendmail_path = /usr/sbin/sendmail
    setgid_group = _postdrop
    smtpdpw_server_securityoptions = login,gssapi
    smtpdrecipientrestrictions = permitsasl_authenticated,permit_mynetworks,reject_unauthdestination,permit
    smtpdsasl_authenable = yes
    smtpduse_pwserver = yes
    unknownlocal_recipient_rejectcode = 550

  • Can't Create Mail Accounts in 10.8.2

    I use 3 mail accounts on my Mountain Lion 10.8.2 mail application. Recently, I re-installed the OS recently as I upgraded my HDD to an SSD and since then have not been able to re-configure 2/3 mail accounts. I have a hotmail account which I cannot configure because I do not know what the "server address" is under the Microsoft Exchange option. Similarly, I have a school email account that I have always been able to configure. However, when I go to "Add Other Account" and enter my settings, it gets stuck on the "Discovering Settings..." section for well approximately an hour and running (I plan to let it run to see what happens).
    Any help would be appreciated!

    I'm guessing by the silence that there's no answer and this feature has been removed from Mail in 10.8.
    WHY GOD WHY????

  • IPhone 3G Cannot create mail account from IPhone.

    Cannot create Pop email account from IPhone. Keeps asking if I want to try to create the account without SSL, whether I answer yes or no. I have to create the account via ITunes.
    Any ideas?

    No error msg. Just keeps asking over and over again, if I want to try to setup the account without SSL. If I answer yes. It try's again for 2 min, the repeats the question. If I say no then it takes me back to the config screen for the account where I can select cancel. Never creates the account or give error msg.

  • When i mail icon my phone displays a message '' account restriction - this phone is restricted from creating mail account'' this is after i deleted  the mail account that was there. please help

    When I press the mail icon a message '' account restriction- this iphone is restricted from creating accounts. What could be the problem?

    Settings>General>Restrictions.

  • X3-02 create mail account - communication error

    when i try to create an email account on the nokia x3-02 it fails with the communication error msg. wat is to be done to fix this !

    i'm still having the same problem after reinstalling the 5.65 update...
    although opera mini now works... communities, chat and mail are still not working... always network communication problem...

  • Hp veer 4 g unable to create mail account

    i have hp veer 4g, unable to set up mail accont. it says certificate expired. unable to open on manual mode also. please help

    I too am having the same problems and can't get the WebOS Doctor because I don't have the palm account. There has to be a way to download the doc without an account.

  • Sending mail thru external ISP, authentication problem

    Hello all,
    i have a little problem that im sure some of you can help me fix. I have a mail server running on a Xserve G5 with 10.4.6. It runs on a local (private) network, mails a polled with fetchmail. Everything works fine except that i can't send mails thru my ISP. Heres what the smtp protokoll says:
    May 4 08:56:58 mediatelserver postfix/smtp[3231]: 94CD148774: to=<[email protected]>, relay=smtp.serverkompetenz.de[81.169.163.72], delay=0, status=bounced (host smtp.serverkompetenz.de[81.169.163.72] said: 550 Anmeldung erforderlich / Authentication required (in reply to MAIL FROM command))
    Due to the fact that my ISP doesn't support SMTP AUTH or TLS, i have to authenticate with plain user/password. My question is, how can i do this?
    Heres the postconf -n output. I've done some "testing" on it
    alias_database = hash:/etc/postfix/aliases
    alias_maps = hash:/etc/postfix/aliases
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    daemon_directory = /usr/libexec/postfix
    debugpeerlevel = 2
    enableserveroptions = yes
    inet_interfaces = all
    mail_owner = postfix
    mailbox_transport = cyrus
    mailq_path = /usr/bin/mailq
    manpage_directory = /usr/share/man
    messagesizelimit = 0
    mydomain = mediatel.private
    mydomain_fallback = localhost
    myhostname = mediatelserver.mediatel.private
    mynetworks = 127.0.0.1/32,10.10.10.0/24
    mynetworks_style = subnet
    newaliases_path = /usr/bin/newaliases
    queue_directory = /private/var/spool/postfix
    readme_directory = /usr/share/doc/postfix
    relayhost = smtp.serverkompetenz.de
    sample_directory = /usr/share/doc/postfix/examples
    sendmail_path = /usr/sbin/sendmail
    setgid_group = postdrop
    smtpdpw_server_securityoptions = plain
    smtpdrecipientrestrictions = permitsasl_authenticated,permit_mynetworks,reject_unauthdestination,permit
    smtpdsasl_authenable = yes
    smtpdsenderrestrictions = hash:/etc/postfix/access
    smtpduse_pwserver = yes
    unknownlocal_recipient_rejectcode = 550
    Thanks in advance
    WISKY

    I see the problem, as we had exactly the same problems. We have a XServe fetching the mails from a ISP with POP. The clients however connect to the Xserve with IMAP. There are clients with 7GB of mailbox size. So, once more: that is the recieving and hosting part.
    If the client sends a mail, it sends it with SMTP to the XServe. But then: why to SMTP to the ISP instead of SMTP to the final destination directly? This has nothing to do with the client, because in both cases, the client connects only to the XServe.
    So: deactivate this checkbox "Alle Nachrichten über diesen Host weiterleiten" and have fun!! At least: give it a try.
    cheers

  • Mail cant create mail account for icloud

    Not quite ready to upgrade to lion but cant get mail in snow leopard to set up an account to download my icloud .me emails.
    Im on the latest version of snow.
    Is t me or mail? surely its just an IMAP account at the end of the day

    sorry answered my own question
    To Manually Set iCloud mail on 10.6.8
    that has to be another example of apple "cant be bothered" kind of downright obstructive to users of older systems / software?

  • Create "Mail" account, Nokia X3-02

    hello!!; I recently bought my new nokia X3-02, but unfortunately i cannot create my yahoo account;
    first i have to read the userconditions and then accept; but when accepting the button; I get an message "communication error"????? try later!!!
    but internet works; the only thing that not work is my email account;
    (i also dont get the icons for emal account etc) please help
    thank you very much

    http://www.youtube.com/watch?v=wYoK6XGY0Bo
    here is a quick guide
    there is no harm in not accepting the T and Cs 
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

Maybe you are looking for

  • SYS_REFCURSOR takes more time than direct query execution

    I have a stored proc which has 4 inputs and 10 output and all outputs are sys_refcursor type. Among 10 ouputs, 1 cursor returns 4k+ records and all other cursors has 3 or 4 records and average 5 columns in each cursors. For this, it takes 8 sec to co

  • My itunes wont open after update.

    I just updated my itunes after the longest time, and lo and behold when the update finished my itunes refused to start up or work at all. No error messages or anything. It simply won't start. help? anyone? I tried installing all possible updates to m

  • OVERRIDDEN INDESIGN DOCUMENT RECOVERY???

    I accidentally saved an Indesign CS4 document as the name of another document, and saying "replace", overriding it completely. It was just 2 saves ago that I would like to recover. I already closed and reopened the document. Is there any way to recov

  • Macbook pro retina ghost image problem

    I have heard about the burn-in problem on macbook pro retina display especially on LG screen. After I got my macbook retina for 3 months, the ghost image problem become really really unacceptable. After 4~5mins, the image on screen will burn in obvio

  • Where should I store the rendered files?

    (My Color projects are in "Documents") Where should I store the rendered files? On my external HD with my FCP media? Or on my Hard Disk is fine ? Can I calculate that 1 Go of DV NTSC = 1 Go of rendered file in 10 bits? Many thanks