Here i am going to do send my data on particular E-mail.
Data contains name of the sender,email of the sender and message of the sender. All above information to my mail.
Please, help me to solve out.
Here i am going to do send my data on particular E-mail.
Data contains name of the sender,email of the sender and message of the sender. All above information to my mail.
Please, help me to solve out.
First of all create the email where you want to get the feedback. So you have your email and your password.
Then create an activity that contains an EditText with an id
<EditText android:id="body"
android:layout .... />
<EditText android:id="useremail"
... />
<EditText android:id="username"
... />
just follow the link below: link
and fill the following info:
GMailSender sender = new GMailSender("username@gmail.com", "password");
sender.sendMail("Users Feedback",
"User Name:\t"+((EditText)getValueById(R.id.username).getText())+"\n"
+"User Email:\t"+((EditText)getValueById(R.id.useremail).getText())+"\n\n"
+"Content:\t"+((EditText)getValueById(R.id.body).getText()),
"user@gmail.com",
"user@yahoo.com");
I'm using this wrapper:
public static void sendEmail(Context ctx) {
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
String[] recipients = new String[]{"***your.mail@example.com***"};// Replace your email id here
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, recipients);
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "*TITLE*");// Replace your title with "TITLE"
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "");
emailIntent.setType("***text/plain***"); // set content type here
ctx.startActivity(Intent.createChooser(emailIntent, "Send E-mail..."));// it will provide you supported all app to send email.
}