Skip to content

Instantly share code, notes, and snippets.

@Jadens-arc
Created December 12, 2019 17:57
Show Gist options
  • Save Jadens-arc/a7c6a9174fcc98d98cfc6acc647ca0bc to your computer and use it in GitHub Desktop.
Save Jadens-arc/a7c6a9174fcc98d98cfc6acc647ca0bc to your computer and use it in GitHub Desktop.
Gmail Wrapper for python
import smtplib
class EmailClient:
def __init__(self, user_address, user_password):
self.user_address = user_address
self.user_password = user_password
self.s = smtplib.SMTP('smtp.gmail.com', 587)
self.s.starttls()
def send(self, receiver, message):
self.s.login(self.user_address, self.user_password)
self.s.sendmail(self.user_address, receiver, message)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment