0

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?

Akash Deep
  • 95
  • 5

1 Answers1

2

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.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Thank you for your help. I will work on the web service. Is there anywhere from where I can start building/learning it. Can you suggest ? – Akash Deep Jan 06 '17 at 13:50
  • @AkashDeep: I suggest that you talk to your server team and ask them what should be done. If you do not already have a Web service, and all the user registration/authentication stuff for that, then you really need to revisit the "without any interference of an email client" requirement and get rid of it. – CommonsWare Jan 06 '17 at 13:59