How to access smtp.gmail.com or other to send email

can you show me how to add a float switch to trigger the email? thank you.