这个问题是因为 line: mail = outlook.CreateItem(0)吗?我想在python中的for循环中发送n封电子邮件。
for aaa in jira.search_issues(JQL,startAt=0, maxResults=50):
print(aaa)
try:
tworca = (jira.issue(aaa).fields.creator.name)
przypisany =(jira.issue(aaa).fields.assignee.name)
import win32com.client as win32
outlook = win32.Dispatch('outlook.application')
mail = outlook.CreateItem(0)
mail.To = tworca + ';' + przypisany
mail.Subject = 'blablabla'
mail.Body = 'Message body'
mail.send()
print ("OK!")
except Exception as e:
print("ERROR: " + str(e))
print ("done!")
追溯:
Traceback (most recent call last):
File "C:\xxx\xxx\xxx\xxx.py", line 12, in <module>
mail.send()
TypeError: 'bool' object is not callable
哈士奇WWW
相关分类