How to send smtp mails using apps

i have a scenario,
when clicking single user, that button run the process and send the mail to that user
when clicking all users , that button send the mail to all users
Can anyone please help me out this, thanks in advance

If you’re using email clients, such as Thunderbird or Outlook, you can use the Gmail SMTP server details to still send emails via your Gmail account.

ok , i am new to this content, iam using smtp to send mails ,can you tell me the steps how to create that process and connect to apps, if possible
Thanks in advance