This commit is contained in:
yuanbaolei 2020-08-20 23:11:34 +08:00
parent b0db94c1ca
commit 73bf288a67
3 changed files with 2 additions and 3 deletions

View File

@ -12,8 +12,8 @@ import time
def sendMail(user, password, host, to, subject=None):
smtp = SMTP(user=user, password=password, host=host)
time.sleep(3)
smtp.sender(to=to, subject=subject)
try:
smtp.sender(to=to, subject=subject)
smtp.sender(to=to)
return print('📮 Email sent successfull')
except Exception as error:

1
run.py
View File

@ -25,7 +25,6 @@ main方法说明
import seldom
import time
from models import osSystem
from models.mail import sendMail

View File

@ -8,8 +8,8 @@
import seldom
from seldom import Seldom
import sys
import os
import sys
sys.path.append(os.pardir)
from models.osDriver import osSystem
from PageObject.loginPage import login