Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从android应用程序发送电子邮件的源代码_Android_Email - Fatal编程技术网

从android应用程序发送电子邮件的源代码

从android应用程序发送电子邮件的源代码,android,email,Android,Email,我想在即将推出的android应用程序中提供电子邮件功能。您能告诉我在哪里可以获得一些关于如何从android应用程序发送电子邮件的好的源代码示例吗。提前感谢。K9 mail是一款优秀的android开源、全功能电子邮件客户端。它支持POP3、IMAP和Exchange帐户。如果你研究android电子邮件应用程序的来源,你会找到所有你需要学习的东西。它托管在Github上: 以下是google play store上的免费应用程序: K9 mail是一款优秀的android开源、全功能电子邮

我想在即将推出的android应用程序中提供电子邮件功能。您能告诉我在哪里可以获得一些关于如何从android应用程序发送电子邮件的好的源代码示例吗。提前感谢。

K9 mail是一款优秀的android开源、全功能电子邮件客户端。它支持POP3、IMAP和Exchange帐户。如果你研究android电子邮件应用程序的来源,你会找到所有你需要学习的东西。它托管在Github上:

以下是google play store上的免费应用程序:


K9 mail是一款优秀的android开源、全功能电子邮件客户端。它支持POP3、IMAP和Exchange帐户。如果你研究android电子邮件应用程序的来源,你会找到所有你需要学习的东西。它托管在Github上:

以下是google play store上的免费应用程序:


如果您只是想让用户向您发送邮件,您可以使用此代码。 它使用emailIntent

//letting the user write a email to us
            Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
            emailIntent.setType("plain/text");
            emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL,
                    new String[] { "abc@xyz.com" });
            emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,
                    "subject of mail");
            emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,
                    "Insert your mail content");
            MainMenuActivity.this.startActivity(Intent.createChooser(
                    emailIntent, "Send mail..."));

如果您只是希望用户向您发送邮件,则可以使用此代码。 它使用emailIntent

//letting the user write a email to us
            Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
            emailIntent.setType("plain/text");
            emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL,
                    new String[] { "abc@xyz.com" });
            emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,
                    "subject of mail");
            emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,
                    "Insert your mail content");
            MainMenuActivity.this.startActivity(Intent.createChooser(
                    emailIntent, "Send mail..."));