I am using the following code from here to start an e-mail:
Android: Using email intent to send email, possible to alter message just before sending?
The code is as follows:
private void sendEmail(String recipient, String subject, String message) {
try {
final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("plain/text");
if (recipient != null) emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{recipient});
if (subject != null) emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);
if (message != null) emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, message);
startActivity(Intent.createChooser(emailIntent, "Send mail..."));
} catch (ActivityNotFoundException e) {
// cannot send email for some reason
}
}
When testing on my phone (HTC Desire) I don't get the option for using my Exchange/Outlook email (note I do when I click an e-mail link on the web for example).
Instead I get option for 'Gmail' and 'Evernote - Create Note' (very strange).
The code works as expected with Gmail, which is great, but I need it to work for Outlook. Anyone got an idea what the issue is? Thanks.