Send email: Difference between revisions

m
Line 1,126:
Howdy from a python function
</pre>
 
=== Windows ===
Using Outlook COM server with the Pywin32 library.
 
<lang python>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")</lang>
 
=={{header|R}}==
Anonymous user