Python sendgrid – Concat/добавление строки в HTML_CONTENTPython

Программы на Python
Anonymous
Python sendgrid – Concat/добавление строки в HTML_CONTENT

Сообщение Anonymous »

Я пытаюсь добавить строку в содержимое thml, но получаю не то, что требуется

'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

Вернуться в «Python»