Sending a Confirmation Mail to Customers when a button is clicked

I need to send confirmation mail to customer once, When Customer orders it.

I have some methods in Google but all of those methods Triggers the Mail Extension in Mail App and Opens up Mail

I don't need to trigger and show the Mail to Customers

I just want to send the Order summary to customer Mail Address

is there any way or API , SDK

The reason the Mail app opens is because of privacy. No app should be able to send an email without any interaction with the user.

To get around this, why not use a PHP script on a server under your control? POST the relevant encrypted information to the script, and let the script send the email using the servers mail command.

Im new to programming my programming is Swift so what you are saying is difficult to understand also im not sure about php is there any other solution or it is easy to do on php using own servers? if yes can you elaborate

Thank you

Sending a Confirmation Mail to Customers when a button is clicked
 
 
Q