gpt4 book ai didi

android - 如何通过电子邮件发送密码?

转载 作者:行者123 更新时间:2023-11-30 02:57:55 25 4
gpt4 key购买 nike

通过电子邮件发送密码

大家好,我正在使用忘记密码的电子邮件功能。

只能通过 javamail api 实现吗?或者它可以通过 intent 方法完成,因为我不想弹出任何电子邮件发送,如 Intent.action.sendto/mailto n all .. 我想要的只是通过 edittext 获取电子邮件 ID,然后通过电子邮件将密码发送给它。 .

我不想要电子邮件检查功能,它是否存在。我想要的只是它是否存在,如果可能/存在,就发送电子邮件。

我正在通过 java 邮件 api 使用..但不适合我..

感谢您的回复。

谢谢。

最佳答案

我从 here 得到了这段代码.

public class Email extends Activity implements View.OnClickListener {

EditText personsEmail, intro, personsName, stupidThings, hatefulAction,
outro;
String emailAdd, beginning, name, stupidAction, hatefulAct, out;
Button sendEmail;

@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.email);
initializeVars();
sendEmail.setOnClickListener(this);
}

private void initializeVars() {
// TODO Auto-generated method stub
personsEmail = (EditText) findViewById(R.id.etEmails);
intro = (EditText) findViewById(R.id.etIntro);
personsName = (EditText) findViewById(R.id.etName);
stupidThings = (EditText) findViewById(R.id.etThings);
hatefulAction = (EditText) findViewById(R.id.etAction);
outro = (EditText) findViewById(R.id.etOutro);
sendEmail = (Button) findViewById(R.id.bSentEmail);
}

public void onClick(View v) {
// TODO Auto-generated method stub

convertEditTextVarsIntoStringsAndYesThisIsAMethodWeCreated();
String emailaddress[] = { emailAdd };
String message = "Well hello "
+ name
+ " I just wanted to say "
+ beginning
+ ". Not only that but I hate when you "
+ stupidAction
+ ", that just really makes me crazy. I just want to make you "
+ hatefulAct
+ ". Welp, thats all I wanted to chit-chatter about, oh and"
+ out
+ ". Oh also if you get bored you should check out www.mybringback.com"
+ '\n' + "PS. I think I love you... :(";

}

private void convertEditTextVarsIntoStringsAndYesThisIsAMethodWeCreated() {
// TODO Auto-generated method stub
emailAdd = personsEmail.getText().toString();
beginning = intro.getText().toString();
name = personsName.getText().toString();
stupidAction = stupidThings.getText().toString();
hatefulAct = hatefulAction.getText().toString();
out = outro.getText().toString();
}

@Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
finish();
}

}

关于android - 如何通过电子邮件发送密码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22982263/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com