Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8521441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:49:33+00:00 2026-06-11T06:49:33+00:00

I have created login demo.I am parsing username and password using JSON parser which

  • 0

I have created login demo.I am parsing username and password using JSON parser which is connected with PHP code.I have also done code for forgot password.But I am unable to get any mail.Why?I have created one Forgot password activity in that one textfield for entering email id and when I hit submit button,mail should go with password to my inbox.How to do it?anyone please help me?

Here is my code for Forgot Password:

package com.Login;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;


public class ForgotPassActivity extends Activity {
     EditText address, subject, emailbody, et_email;
    @Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub

    super.onCreate(savedInstanceState);
    setContentView(R.layout.forgot_password);
    TextView textv = (TextView) findViewById(R.id.lbl_loginhere);
    et_email = (EditText) findViewById(R.id.et_email);
    textv.setOnClickListener(new OnClickListener() {

        public void onClick(View v) {
            // TODO Auto-generated method stub
            ForgotPassActivity.this.finish();
            Intent intent = new Intent();
            intent.setClass(v.getContext(), LoginActivity.class);
            startActivity(intent);

    }
        //Code For Sending mail

    });
    Button b1 = (Button) findViewById(R.id.submitButton);
    b1.setOnClickListener(new OnClickListener() {

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

    });

}
    public void sendEmail(){


          final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
          emailIntent.setType("plain/text");
          emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{"testmail@testmail.com"});
          emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject.getText());
          emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, emailbody.getText());
          ForgotPassActivity.this.startActivity(Intent.createChooser(emailIntent, "Send mail..."));

}


}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T06:49:34+00:00Added an answer on June 11, 2026 at 6:49 am
    Edited
    

    If you’re using any web service the better way is call the web service by passing the user email address and search in your database and fetch the record. For secure way passing data create the Post service and from your service like php or any another technology send the mail to the incoming email with it’s password.

    Updated

    you can use this function from your service mail() see for more info from the links and here is simple snippet of code

    <?php
    // The message
    $message = "Line 1\nLine 2\nLine 3";
    
    // In case any of our lines are larger than 70 characters, we should use wordwrap()
    $message = wordwrap($message, 70);
    
    // Send
    mail('caffeinated@example.com', 'My Subject', $message);
    ?>
    

    http://www.w3schools.com/php/php_mail.asp

    http://php.net/manual/en/function.mail.php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have created a forum using php/mysql and users login through facebook using php
I am using my admin panel login script where i have created a global.php
i have created a login page when i enter username and password(if both are
I have created a login page using java swing. and i created jar for
I have created a login page. In this page i used div tag which
I have just started PHP and MySQL and have created a login form and
I have created simple javascript widget where login happens using Facebook Single Sign On.
I have created a login page using a nice guide that I found about
I have created a simple login page which is based on the sessions. session_start();
I have created a login page at www.mywebsite.com/members/login I'm using Zend Framework, Now I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.