电子邮件意图不显示Exchange邮件(Outlook)中作为一个选项 [英] e-mail Intent not showing Exchange Mail (Outlook) as an option
问题描述
当我点击一个按钮,我用下面的code键启动电子邮件并从数据库中查询数据填充它。
When I click a button, I am using the following code to start an e-mail and fill it with data from a database query.
问题是,在发送邮件...对话框,弹出的起来的时候按钮点击,它只是提供了以下选项:
The problem is, in the 'send mail...' dialog that pop's up when the button is click, it only offers the following options:
* Evernote - create note
* Gmail
* Skype
我需要通过我的工作的Microsoft Exchange服务器(我的主要的电子邮件客户端)发送这一问题,但是不提供(它然而,当我点击网络链接或在其他应用程序它类似按钮):
I need to send this via my work Microsoft Exchange server (my main e-mail client), but this is not offered (it is however, when I click on web hyperlinks or similar buttons in other applications it does):
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
}
}
任何想法?
推荐答案
好了,所以我觉得在这个岗位了答案:<一href=\"http://stackoverflow.com/questions/3312438/how-to-open-email-program-via-intents-but-only-an-email-program\">How通过意图打开电子邮件程序(但只有一个电子邮件程序)
Ok so I found the answer in this post: How to open Email program via Intents (but only an Email program)
的更改MIME类型就是答案,这是我在我的应用程序没有改变相同的行为。我用intent.setType(信息/ RFC822); 的
工作就像一个梦!
这篇关于电子邮件意图不显示Exchange邮件(Outlook)中作为一个选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!