How to send email programmatically and display success message in magento 2

I am new to this magento. I want to send a email and display a success message in magento2. Anyone please give me a solution for sending a mail programmatically.

All topic