Question

I want to put feedback option in android app as some apps do. I presently have this code

Intent Email = new Intent(Intent.ACTION_SEND);
        Email.setType("text/email");
        Email.putExtra(Intent.EXTRA_EMAIL, new String[] { "feedback@gmail.com" });
        Email.putExtra(Intent.EXTRA_SUBJECT, "Feedback");
        Email.putExtra(Intent.EXTRA_TEXT, "Hi");
        startActivity(Intent.createChooser(Email, "Sending Feedback:"));

But this code redirects to default app. As I don't want to show to address, I came to know that it is not possible with default in-built email app.

Later thought to implement using java api, so that I can hardcode my mail credentials(including username, password) and send it to the mail that I specify. So that user doesn't need to log in. Just he mentions his mail address in the given column, message. That's it. Then after clicking on send button, it should go the feedback mail id. But this is risky if some one converts my apk into source code as they would come to know my credentials that I used for this feedback. Can some one please suggest me how to implement this in a correct way so that user need not have any credentials or mail app?

Sending mail from php:

<?php
 $to = "recipient@example.com";
 $subject = "Hi!";
 $body = "Hi,\n\nHow are you?";
 if (mail($to, $subject, $body)) {
   echo("<p>Email successfully sent!</p>");
  } else {
   echo("<p>Email delivery failed…</p>");
  }

     ?>
Was it helpful?

Solution

An alternative way of hiding you data will be to post it to a server, i.e you may try considering posting your feedback data to some php script or a servlet, which later on forwards it to your mailbox.

There are so many free hostings out there, one I use for same purpose is www.3owl.com, I just have a PHP file there, and all the responses and feedbacks from all the websites are submitted there, which are then forwarded to my mailing address.

And, about mails going to Spam, well mailbox are intelligent these days, they can be taught what is not a spam, and what is :)

OTHER TIPS

You could consider adding a separate API altogether and use their online client to view and manage the messages you receive:

  1. Apptentive

  2. LetThemVote

  3. Recon Instruments

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top