i have written a program which has a form consisting of name , phone no and email and a submit button to send the above details to a mail address ,
i have also tried using intent and it works fine but i dont want to use intent as i want the user to stay inside the application and not go outside the application.
So i got the code for java mail api , and also receiving messages in my mail when i click on submit button , but is it possible to also send the form details with it ?
"Name : " + eName.getText().toString() + '\n' + "Email ID : " + eEmail.getText().toString() + '\n' + "Contact No : " +ePhone.getText().toString() + '\n' + "Message : " + eMessage.getText().toString()
i want to send the above data inside this
GMailSender sender = new GMailSender(
"email-address",
"password");
// sender.addAttachment(Environment
// .getExternalStorageDirectory().getPath()
// + "/image.jpg");
sender.sendMail("Test mail", "Body message",
"[email protected]",// From
"[email protected]");// To
} catch (Exception e) {
Toast.makeText(getApplicationContext(),
"Please check the internet connection",
Toast.LENGTH_LONG).show();
}
}
Is it possible ?
If yes then need some help please
Thanking You
Copyright License:
Author:「arjun narahari」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/27694056/is-it-possible-to-send-the-form-details-through-mail-using-java-mail-api-in-andr