我创建了以下内容:
import win32com.client as com
outlook = com.Dispatch("Outlook.Application")
def ravi(str):
newMail = outlook.CreateItem(0)
newMail.Subject = "I AM SUBJECT!!"
newMail.Body = "I AM IN THE BODY\nSO AM I!!!"
newMail.To = str
#newMail.display()
newMail.send()
return
list = ["xyg@hpcl.in","gjk@gmail.com","lmn@yahoo.co.in" ]
for i in list:
ravi(i)
虽然电子邮件正在显示,但它们并未发送。
我的bool项目无法调用。请解决。