I was trying to create an appointment system where appointment system will send mail to the user where mail data will be dynamic but the problem is how cloud I pass data inside html_content like the date is a variable how can I pass date value inside Meeting Date + symbol is not working because mine is not string its an HTML code
Here is my Code
subject, from_email, to = 'You Have A Meeting Request', 'send@gmail.com', 'text@gmail.com'
text_content = 'Dear Sir,'
date = 12-12-2018
html_content = '<p>This is an ' \
'<strong>Meeting Request</strong>' \
' <ul>' \
'<li><b>Meeting Date:</b> {{ date }}</li>' \
'<li><strong>Meeting Place:</strong> DRL , Meeting Room 1</li>' \
'<li><strong>Time:</strong> 10-30 To 13-30</li>' \
'<li><strong>Meeting Purpose:</strong> For Opening Appointment</li>' \
'<li><strong>No Of Person:</strong> 5</li>' \
'<li><strong>Priority:</strong> High</li>' \
'<li><strong>Request By:</strong> Mr X</li>' \
'</ul>.</p>'
msg = EmailMultiAlternatives(subject, text_content, from_email, [to])
msg.attach_alternative(html_content, "text/html")
msg.send()