K
K
Kirill Gorelov2019-03-09 11:14:45
Django
Kirill Gorelov, 2019-03-09 11:14:45

Django, send email template?

Hello guys.
I want to send a letter using a template and insert my variables there.
Everything turns out, but there is one problem, the letter comes in the source code.
I send a letter like this.

param = {"one":"Adrian","two":"two_avariable"}
message = render_to_string('newsletter/register.html', param)

and send it like this
param = {"one":"Adrian","two":"two_avariable"}
 template = loader.get_template("newsletter/register.html")
 message = template.render(param)

But the letter come like this
5c8375d98f64e656444376.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question