Hi,
After some fixes, the creation of the account worked (I can send a screenshot if you require).
But it fails when setting the smtp server, at following instruction:
set smtpsrv to getsmtpserver(maildomain, emaillogin)
tell application "Mail" to set smtp server of newacct to "[login to view URL]"
return smtpsrv
I don't understand why your script tries to set the smtp server to "[login to view URL]" instead of using the smtpsrv variable just created.
But maybe you have a reason for doing this, I don't know.
Feel free to ask further information.
Kind regards,
Mike