如何从Android应用程序直接发送电子邮件,而不显示设备的默认电子邮件形式? [英] How can I send an email from android application directly without showing the default email form of the device?
问题描述
Intent sendIntent;
sendIntent = new Intent(Intent.ACTION_SEND);
我的要求是我想要立即发送电子邮件,目前该应用程序正在向我显示安装的电子邮件应用程序在我可以重新发送电子邮件的设备发送之前,我想直接发送邮件,而不显示安装的应用程序。
谢谢
有两种方式
1)使用SMTP 按照链接了解详情
2)使用Webservice(例如PHP脚本)所以有一个服务器端代码,你用这个URL(例如,名称,主题等等)打到这个URL,所以基本上PHP代码发送邮件到底是很容易使用的。
个人而言,我建议您使用Webservice
I am building a form that sends emails from an android application, I am using Intents to send the email, that is:
Intent sendIntent;
sendIntent = new Intent(Intent.ACTION_SEND);
My requirement is that I want the email to be sent immediately, currently the application is showing me installed email applications in device where I can recompose the email before sending, I want to send the mail directly without showing installed applications.
Thanks
There are two ways
1) using SMTP follow the link for details 2) using Webservice( for example PHP script ) so there is a server side code and you hit that URL with param like ( name,subject etc) so basically PHP code send mail at the end and it's very easy to use .
Personally, I suggest you use Webservice
这篇关于如何从Android应用程序直接发送电子邮件,而不显示设备的默认电子邮件形式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!