제 앱에서 이메일을 보낼수 있나요?
android
1 답변
가장 쉬운 방법은 Intent를 쓰는거 같습니다.
Intent i = new Intent(Intent.ACTION_SEND);
i.setType("message/rfc822");
i.putExtra(Intent.EXTRA_EMAIL , new String[]{"이메일 주소"});
i.putExtra(Intent.EXTRA_SUBJECT, "이메일 제목");
i.putExtra(Intent.EXTRA_TEXT , "이메일 내용 ");
try {
startActivity(Intent.createChooser(i, "이메일 보내는 중..."));
} catch (android.content.ActivityNotFoundException ex) {
Toast.makeText(MyActivity.this, "이메일 주소가 없습니다.", Toast.LENGTH_SHORT).show();
}
-
2016년 01월 11일에 작성됨
출처 : https://stackoverflow.com/questions/2197741/how-can-i-send-emails-from-my-android-application 이 질문은 저작자표시-동일조건변경허락(https://creativecommons.org/licenses/by-sa/3.0/deed.ko) 라이센스로 이용할 수 있습니다. 윤동길 2018.3.21 13:44