Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create Email account from type existing Account Services

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 enter image description here

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.

like image 231
Android Learner Avatar asked Jul 19 '12 11:07

Android Learner


People also ask

How do I create an email account?

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.

How do I add multiple email addresses to my account?

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.

How do I create mailboxes for existing user accounts?

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.

What are the different types of email accounts?

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.


1 Answers

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.

like image 73
Anup Cowkur Avatar answered Sep 17 '22 04:09

Anup Cowkur