Akash Deep
Akash Deep

Reputation: 95

Sending email from Android app without using email client

I have to create an app, in which the user selects the work they need to get done and request a quote, which is essentially, a mail button. I tried using java mail, but it requires hard coded password.

What I need is that on pressing this button, the mail should be sent to me without any interference of an email client. Is there any way I can achieve this?

Upvotes: 0

Views: 635

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006789

Have your app tell your Web service to request a quote. Have your Web service send the email.

Anything involving sending the email directly from the client will involve either:

  • the user (by means of an email client)
  • a hard-coded password
  • a security flaw (e.g., an email client allowing other apps to send emails without user involvement)

Since none of those are options based on your question (plus, ethics), you need to send the email from somewhere else, and that "somewhere else" is inevitably some form of server. It would not have to be a Web service necessarily, but that would be the typical solution nowadays.

Upvotes: 2

Related Questions