import win32com.client as client
import pathlib
# pathlib.Path.cwd()
img = pathlib.Path(r"XXXXXX.jpg")
img_final =str(img.absolute())
outlook = client.Dispatch('Outlook.Application')
message = outlook.CreateItem(0)
message.Display()
message.To = 'xxxx@163.com'
message.Subject = 'RPA'
message.Attachments.Add(img_final)
message.send()