'str1' следует добавить вместо str1 в 'Прикреплен отчет о ваших данных - +str1'
Код: Выделить всё
str1= 'StringToBeAdded'
html_content1 = ''' Hi All,
Greetings from xyz!
Attached is the report of your data - + str1
Note: This is an automated email. In case of any queries, please reach us at
Regards,
abc '''
message = Mail(
from_email='from@example.com',
to_emails=to@example.com',
subject='Mail,
html_content=html_content1)
Прикреплен отчет о ваших данных — StringToBeAdded
Заранее спасибо
Подробнее здесь: https://stackoverflow.com/questions/787 ... ml-content