try to get the singleton class done for importing
fixed mail task
This commit is contained in:
parent
3ef1dcecd7
commit
8f9d9bc551
4 changed files with 95 additions and 19 deletions
|
|
@ -67,10 +67,10 @@ class MailTask(Task):
|
|||
now = datetime.datetime.now()
|
||||
message['Date'] = now.strftime("%a, %d %b %Y %H:%M:%S")
|
||||
message['From'] = self.sender
|
||||
message['To'] = self.rcpt["rcpt"]
|
||||
message['To'] = self.rcpt
|
||||
s = smtplib.SMTP(self.host, self.port)
|
||||
#s.login(self.userName, self.password)
|
||||
s.sendmail(self.sender, self.rcpt["rcpt"], message.as_string())
|
||||
s.sendmail(self.sender, self.rcpt, message.as_string())
|
||||
s.quit()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue