I'm using Magento 2.2. Order confirmation mail was sent when checkout button trigged. So, I disabled Order mail from the Backend. I only need to send order confirmation mail/invoice from my website itself automatically when payment is done. But I'm only getting mails from PayU about credit and debit payment details.
Magento – How send order confirmation mail after only Payment success
magento2magento2.2order-email
Best Answer
In your module create
events.xml
in etc folderin your Observer