0

今後の Android アプリケーションで電子メール機能を提供したいと考えています。Android アプリケーションから電子メールを送信する方法について、適切なソース コードの例をどこで入手すればよいか教えてください。よろしくお願いします。

4

2 に答える 2

4

K9 メールは、Android 用の優れたオープン ソースのフル機能のメール クライアントです。POP3、IMAP、および Exchange アカウントをサポートしています。ソースを調べれば、Android メール アプリの作成に必要なすべての情報が見つかります。ここの Github でホストされています。

https://github.com/k9mail/k-9

Google Play ストアの無料アプリは次のとおりです。

https://play.google.com/store/apps/details?id=com.fsck.k9&hl=ja

于 2012-10-21T09:09:37.610 に答える
0

ユーザーにメールを送信してもらいたいだけの場合は、このコードを使用できます。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..."));
于 2012-10-21T12:11:55.173 に答える