-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error report while start my application #253
Comments
How are you using yagmail |
I smply use it just like this class mailManager:
def __init__(self):
self.User = '[email protected]'
self.PassWord = '**********'
self.SMTPClient = yagmail.SMTP(
host='smtp.EmailServer.com',
user=self.User,
password=self.PassWord,
port=465
)
def sendMail(self, receiver, subject, text):
try:
self.SMTPClient.send(receiver, subject, text)
print("Successfully sending e-mail!")
except Exception:
print("Error while sending e-mail:", Exception) |
Try creating the smtp client right before sending all the time |
Acturally I just create a new mialManager instance in file app.py and not using sendMail function yet. I've switched to smptlib module in my app temporarily, but I still wanna figure it out. I notice that sometimes you need create a connection by using smtplib.SMTP_SSL() instead of smtplib.SMTP() in smtplib module, is this one of the possible reasons? |
here is some error message:
Exception ignored in: <function SMTP.del at 0x7f60bed18430>
description:
I'm gonna test the function of sending email by using yagmail module in my app,but when I running my project the above problem occurred. dose it exist an error in source code? or just my fault? How should I solve this problem?
here is the code for the corresponding location above:
The text was updated successfully, but these errors were encountered: