In my project i have to send an email and pass a value into html code. I try this:
l_sender = []
l_sender.append('mario.rossi@test.com')
emailsend(l_sender)
def emailsend(l_sender):
context = {
'news': 'We have good news!'
}
try:
send_html_email(l_sender, 'Get started with Aida', 'email.html', context, sender='wepredict@cathedral.ai')
print("Email send")
except Exception as e:
print(e)
in email.html i insert {{ context.news }} but nothing appen. How can i pass my news val value in mail.html?
Thanks in advance