title: Providing feedback with mail in android
body: <p>I want to put feedback option in android app as some apps do. I presently have this code</p>
  
  <pre><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:"));
  </code></pre>
  
  <p>But this code redirects to default app. As I don't want to show <strong>to address</strong>, I came to know that it is not possible with default in-built email app. </p>
  
  <p>Later thought to implement using java api, so that I can <code>hardcode</code> 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? </p>
  
  <p><strong>Sending mail from php:</strong></p>
  
  <pre><code>&lt;?php
   $to = "recipient@example.com";
   $subject = "Hi!";
   $body = "Hi,\n\nHow are you?";
   if (mail($to, $subject, $body)) {
     echo("&lt;p&gt;Email successfully sent!&lt;/p&gt;");
    } else {
     echo("&lt;p&gt;Email delivery failed…&lt;/p&gt;");
    }
  
       ?&gt;
  </code></pre>