Created
December 12, 2019 17:57
-
-
Save Jadens-arc/a7c6a9174fcc98d98cfc6acc647ca0bc to your computer and use it in GitHub Desktop.
Gmail Wrapper for python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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