2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
13
Task/Send-email/Python/send-email-3.py
Normal file
13
Task/Send-email/Python/send-email-3.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import win32com.client
|
||||
|
||||
def sendmail(to, title, body):
|
||||
olMailItem = 0
|
||||
ol = win32com.client.Dispatch("Outlook.Application")
|
||||
msg = ol.CreateItem(olMailItem)
|
||||
msg.To = to
|
||||
msg.Subject = title
|
||||
msg.Body = body
|
||||
msg.Send()
|
||||
ol.Quit()
|
||||
|
||||
sendmail("somebody@somewhere", "Title", "Hello")
|
||||
Loading…
Add table
Add a link
Reference in a new issue