[英]How can I send an email from android application directly without showing the default email form of the device?
[英]how can i send email from my application using registered Android email without password
我想將一些文本從應用程序發送到自定義電子郵件地址
我需要使用在設備上注冊的電子郵件
我嘗試了許多使用電子郵件和密碼或使用Intent的示例,但這對我來說是不正確的
那么我該怎么做,看起來像這樣
使用以下要求用戶打開的代碼和“電子郵件客戶端”來發送電子郵件-
String to = "sarkerpt@gmail.com";
String subject = "Barcode Reader For Android - Bug Report";
Intent email = new Intent(Intent.ACTION_SEND);
email.putExtra(Intent.EXTRA_EMAIL, new String[]{to});
email.putExtra(Intent.EXTRA_SUBJECT, subject);
email.setType("message/rfc822");
startActivity(Intent.createChooser(email, "Choose an Email client :"));
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.