Using Delphi to send e-mail by Web service (without filtering directories and without user interaction)

advertisements

I have a Delphi application, that needs to send a generated PDF file by email to one recepient of a predefined list of recepients.

  • I do not want to mess around with MAPI (not all customers have configured this)
  • I do not want my customers to enter their mail account details (this means SMTP is no option either)

Therefore I consider to use / setup a PAAS web service to receive the email text, the pdf file and the index number of the recepient to actually do the work. My question is: Does an out-of-the-box solution exist to do this in Delphi, or what would be a preferable way?

For instance I considered using Google App Engine but there seems to be no builtin support in Delphi. I would prefer an out of the box solution or a tested solution with decent documentation. The server part should be as simple as possible.

Edited: Some clarifications:

  • The resulting exe is installed at the customer computer. I think setting up an extra mail account therefore is no option, because someone could extract the credentials from the exe and abuse the mail account. The same seems to be true for web services that provide only one (login/password) access.
  • Using OAuth2 seems to be no option either because I do want to send the email without user interaction.
  • If credentials need to be saved in the executable, and the existing answers suggest so, they should at least provide only very limited rights.

Is this solveable at all?


Is this solveable at all?

No.

If you require that neither the user (by filling in a login form, as is the case with OAuth 2.0) nor the program (by providing hard-coded credentials) authenticates with the web service, the communication with the web service can not be secure.

I suggest to re-think the security requirements and make them much clearer in your question.