OK, this one works with a standard text.
import win32com.client as win32
outlook = win32.Dispatch('outlook.application')
mail = outlook.CreateItem(0)
mail.To = 'XXX@XXX.XX'
mail.Subject = 'SAMPLETEXT'
mail.Body = 'SAMPLETEXT'
mail.Send()With Alexey Pasumansky's suggestion to use the project name, it doesn't work.
(However, the suggestion is from 2017. Maybe it doesn't work with the 1.7.5 version?)
SAMPLETEXT = doc.path.rsplit("/",1)[1]
import win32com.client as win32
outlook = win32.Dispatch('outlook.application')
mail = outlook.CreateItem(0)
mail.To = 'XXX@XXX.XX'
mail.Subject = SAMPLETEXT
mail.Body = SAMPLETEXT
mail.Send()Unfortunately, my scipting skills are very limited...
However, a standard text is more than enough for now.