I have gone through SampleSyncAdapter sample project provided by Android doc, but as I understand, there we need to add an account of custom Account service. But my need is to create an email account from existing account services on device.
To be more clear about my question, I am giving an example
Here are the Account services available on my Device
and I guess 'Google' and 'Email' account services are available on each Android device.
Now I want to configure an 'Email' account, so I must follow these below steps:
Step 1: Enter existing email id and password
Step 2: [a] General Settings Attributes : - (Account name, Real Name, Email Address)
Step 2: [b] Incoming server Attributes : - (POP or IMAP mail server, Server Address, user name, password)
Step 2: [c] Outgoing server Attributes : - (SMTP server, user name, password)
Step 3: By choosing Advanced settings, we can configure port and certificate options.
And we need to go through the above steps manually, but I want to create an Email account programmatically by using all above settings.
So how can I create new email account from existing Account Services progrmatically? I need this functionality for MDM.
From there scroll down to the Email section and click on Email Accounts. From there click on the ‘ Create ‘ button. Username: Enter whatever you want to be your email identifier.
You can create and link multiple email accounts and switch between them easily or you can create aliases which allow you to add extra email addresses to the same account. Aliases are great for when you're asked to provide an email address on a less-than-trustworthy website or you want to sign up for special promotions, but don't want to get spam.
Use the EAC to create mailboxes for existing user accounts In the EAC, go to Recipients > Mailboxes. Click New () and then select User mailbox. On the New user mailbox page, configure the following settings.
Types of Email Accounts. There are two main types of email service providers to choose from: email clients and webmail. When you use your provider to access your email from a different device or location online, you can use one of three major email protocols to do so: POP3, IMAP, and Exchange.
You are not allowed to do this for security reasons.
Imagine accounts being configured with settings that are unknown to the users - the users might not even know the accounts are being created at all! This would be a prime target point for malware, spam etc since no captcha, user permission or any other authentication is involved.
So this is a security measure....and a good one at that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With