Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python send email outlook

import win32com.client as win32
outlook = win32.Dispatch('outlook.application')
mail = outlook.CreateItem(0)
mail.To = 'To address'
mail.Subject = 'Message subject'
mail.Body = 'Message body'
mail.HTMLBody = '<h2>HTML Message body</h2>' #this field is optional

# To attach a file to the email (optional):
attachment  = "Path to the attachment"
mail.Attachments.Add(attachment)

mail.Send()
Comment

PREVIOUS NEXT
Code Example
Python :: remove duplicate row in df 
Python :: how to move a column to last in pandas 
Python :: install django windows 
Python :: python legend outside 
Python :: python check disk space 
Python :: get a list of all files python 
Python :: how to add a list to dataframe in python 
Python :: python save .mat 
Python :: python tqdm while loop 
Python :: python poner en mayusculas 
Python :: python global site packages 
Python :: python reduce function to sum array 
Python :: get all combinations from two lists python 
Python :: pygame hide cursor 
Python :: prime number generator python 
Python :: pyqt5 math 
Python :: display entire row pandas 
Python :: replace url with text python 
Python :: Import "flask" could not be resolved 
Python :: python exceute 60 records per minute counter 
Python :: pandas change frequency of datetimeindex 
Python :: read_csv unnamed zero 
Python :: get adjacent cells in grid 
Python :: build url python 
Python :: nested dict to df 
Python :: find null value for a particular column in dataframe 
Python :: MySQLdb/_mysql.c:46:10: fatal error: Python.h: No such file or directory 
Python :: seaborn heatmap text labels 
Python :: colab read xlsx 
Python :: python multi line print 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =