【问题标题】:how to send password by email?如何通过电子邮件发送密码?
【发布时间】:2014-05-23 19:39:09
【问题描述】:

通过电子邮件发送密码

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

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

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

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

感谢您的回复。

谢谢。

【问题讨论】:

  • 在此处提问之前,您应该做一些研究。如果您使用 Google android intent send email,您应该会得到多个结果。一个这样的例子如下所示。
  • 让我告诉你我先用谷歌搜索然后在这里写一个查询......你回答的不是我问的......在回答之前先阅读问题......
  • 提供一些代码来展示你的尝试。没有它,我真的不明白你在问什么。
  • +1 为上面的链接,这可能就是你要找的

标签: android email passwords


【解决方案1】:

我从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();
}

}

【讨论】:

  • 多么蹩脚..!!我要求通过 JAVA MAIL API .. 或 GMAILSENDER 发送个人电子邮件..
猜你喜欢
  • 2017-02-15
  • 2015-06-10
  • 1970-01-01
  • 2010-11-21
  • 1970-01-01
  • 2010-11-05
  • 2018-12-05
  • 2017-08-30
  • 2020-01-06
相关资源
最近更新 更多