How to successfully add account to android E-mail Database ?
Posted
by santhosh
on Stack Overflow
See other posts from Stack Overflow
or by santhosh
Published on 2010-03-08T11:02:45Z
Indexed on
2010/03/08
11:06 UTC
Read the original article
Hit count: 506
android
Hi all... I am trying to add an account to E-mail database ,Below is the way i'm trying ...
import com.android.email.Account; import com.android.email.Email; import com.android.email.Preferences; import com.android.email.provider.EmailContent;
Account account = new Account(mContext);
account.setDescription("acc added thr prog");
account.setAutomaticCheckIntervalMinutes(10);
account.setEmail("[email protected]");
account.setDraftsFolderName("Drafts");
account.setOutboxFolderName("OutBox");
account.setSentFolderName("Sent");
account.setTrashFolderName("Trash");
account.setName("Tester");
account.setNotifyNewMail(true);
account.setSenderUri("smtp+ssl+://[email protected]:[email protected]"); account.setStoreUri("imap+ssl+://[email protected]:[email protected]"); account.setDeletePolicy(10); account.setVibrate(true); mPrefer = Preferences.getPreferences(getInstrumentation().getContext()); account.save(mPrefer);
Email.setServicesEnabled(mInstrumenatation.getTargetContext());
Any suggestions Greatly appreciated.
With best Regards Santhosh
© Stack Overflow or respective owner