def start_smtp(self, email_username, email_password):
self.server = smtplib.SMTP("smtp.gmail.com", 587)
self.server.ehlo()
self.server.starttls()
try:
self.server.login(email_username, email_password)
print 'LOGIN IS DONE YEYYY, YOU CAN NOW SEND SHIT EMAILS. xD'
return True
except smtplib.SMTPHeloError:
print 'The server responded weird stuff to my login request, please try again'
return False
except smtplib.SMTPAuthenticationError:
print 'Your account name or password is incorrect, please try again using the correct stuff'
return False
except smtplib.SMTPException:
print 'SHIT IS ALL FUCKED THERES NO HOPE THE WORLD IS GOING TO END, HIDEE '
return False
评论列表
文章目录