I have created and Simple app to send e-mail using Intent, with dynamic fields(get required fields at runtime). It works fine.
But i need to add CC to the sender email id. The email has to be sent for the sender email id when it is also sent to the recipient mail-id.
I know the procedure to add the CC through intent by this code.
emailIntent.putExtra(Intent.EXTRA_CC, "sender's mail id");
I need the sender's email id to put there. I've tried this for lot of time. But, not yet result get it. Anyone guide me. Thanks in Advance.
Update -
From this Question. I can successfully add the Gmail's Primary email id. But, if i choose the Email instead of Gmail, i can't get primary email id. I've use this code to fetch the email id -
AccountManager manager = AccountManager.get(TestActivity.this);
Account[] accounts = manager.getAccounts();
int size = accounts.length;
String[] names = new String[size];
for (int i = 0; i < size; i++)
{
names[i] = accounts[i].name;
}
If i use this code means, i can get the all Synchronized email accounts which are all synchronized in Gmail but not in Email. Why this happend? Anyone Guide me?