简体   繁体   English

如何从特定邮件发送电子邮件到其他电子邮件ID?

[英]How to send an email from a specific mail to some other email id?

I want to email some credentials to a specific email address. 我想将一些凭据通过电子邮件发送到特定的电子邮件地 From what email address will this mail be sent? 从哪个电子邮件地址发送此邮件?

Intent i = new Intent(Intent.ACTION_SEND);
i.setType("message/rfc822"); i.putExtra(Intent.EXTRA_EMAIL  , new
String[]{"recipient@example.com"}); i.putExtra(Intent.EXTRA_SUBJECT,
"subject of email"); i.putExtra(Intent.EXTRA_TEXT   , "body of
email");
try {
    startActivity(Intent.createChooser(i, "Send mail...")); } catch (android.content.ActivityNotFoundException ex) {
    Toast.makeText(MyActivity.this, "There are no email clients installed.", Toast.LENGTH_SHORT).show();
}

Who is the sender here? 谁是这里的发件人?

This intent will open the mail clients available in your device. 此意图将打开设备中可用的邮件客户端。 Then its up to you to add sender email ID. 然后由您来添加发件人电子邮件ID。 Or it will take default email ID if you have already logged in. 如果您已经登录,它将采用默认电子邮件ID。

You should use JavaMail Api for this You can send & access email with the help of this:-- Check this ! 您应该使用JavaMail Api这样您可以通过以下方式发送和访问电子邮件: - 检查这个

& here is the library ! 这是图书馆

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将邮件发送到Android中的电子邮件ID? - how to send mail to an email id in android? 如何使用java邮件从android发送电子邮件 - How to send email from android using java mail 如何使用来自@ outlook.com的Java邮件发送电子邮件? - How to send an email using java mail from @outlook.com? 如何在Android应用中打开Gmail并将电子邮件发送到特定ID? - how to open gmail and send email to specific id in a android app? 无法从Android的个人电子邮件发送邮件 - unable to send mail from personal email android Android,如何发送HTML电子邮件并强制Android通过G-Mail发送它而不是其他应用程序? - Android, How to send HTML email and force Android to send it through G-Mail not other applications? 如何创建表单以及如何在不使用Android中默认邮件的情况下将表单数据发送到客户端电子邮件ID - how to create form and how send form data to client email id with out using default mail in android 尝试将邮件发送到动态电子邮件ID时出现错误 - Getting Error when trying to send mail to dynamic Email Id 如何向用户的电子邮件发送唯一 ID 或 email 和密码? - How can I send a unique id or email and password to the user's e-mail? 如何在应用程序中使用用户的电子邮件ID发送电子邮件(无目的) - How to send email using user's email ID from within the app (Without Intent)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM