简体   繁体   中英

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?

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 (eg, 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM