0

I have Exchange ActiveSync setup on my phone and it works as expected. My problem is that when I want to send an email in code it always uses the Gmail account (which of course I cannot remove) as the sender. It is essential that the account used be the Exchange one as that is the users business email account.

I used the code from Send auto email programmatically

It works fine but uses the Gmail account. I have set the Exchange ActiveSync account as the default but it makes no difference. The application is used in a corporate environment only.

Community
  • 1
  • 1
Pierce
  • 11
  • 4

2 Answers2

0

You can go ahead and clear defaults from Manage Apps screen in Settings. That should solve ur problem.

the100rabh
  • 4,077
  • 4
  • 32
  • 40
0

I had exactly the same issue in my project. There is a small bug in the referenced code.

The first line should read

emailIntent.setType("text/plain");

instead of

emailIntent.setType("plain/text");

This fixed it for me. Hope this helps.

Vivek Iyer
  • 364
  • 1
  • 4