Android的应用程序的电子邮件撰写 - 如何自动"发送和QUOT;电子邮件 [英] android app email compose - how to automatically "Send" the email

查看:157
本文介绍了Android的应用程序的电子邮件撰写 - 如何自动"发送和QUOT;电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Android应用程序的本地邮件撰写我的桌子上给我发日志的应用程序崩溃时。

I am trying to use the native email compose in android apps on my table to send me logs when the apps crashes.

在code以下的伟大工程,但本机电子邮件撰写弹出,你必须preSS发送。有没有办法告诉撰写应用程序只需发送电子邮件。它发送一个点击,而无需手动办呢?

The code below works great but the Native Email compose pops up and you have to press send. Is there a way to tell the compose app just to send the email. Send it a click without having to manually do it?

Intent intent = new Intent(Intent.ACTION_SENDTO); // it's not ACTION_SEND
 intent.setType("message/rfc822");

 intent.setType("text/plain");
 intent.putExtra(Intent.EXTRA_SUBJECT, "Subject of email");
 intent.putExtra(Intent.EXTRA_TEXT,    "Body of email");
 intent.setData(Uri.parse("myeamil@yahoo.com")); // or just "mailto:" for blank
 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // this will make such that when user returns to your app, your app is displayed, instead of the email app.
 //startActivity(intent);

感谢。
马克斯

Thanks. Max

推荐答案

您应该尝试<一个href=\"http://stackoverflow.com/questions/25136025/sending-mail-in-android-without-intents-using-smtp\">this问题或有关详细信息,本教程

这篇关于Android的应用程序的电子邮件撰写 - 如何自动&QUOT;发送和QUOT;电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆