I have a sending code:
def send_email(site_id, email):
subject = "Sub"
from_email, to = EMAIL_FROM, email
text_content = 'Text'
html_content = render_to_string(
'app/includes/email.html',
{'pk': site_id}
)
msg = EmailMultiAlternatives(subject, text_content, from_email, [to])
msg.attach_alternative(html_content, "text/html")
msg.send()
And in my template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>title</title>
</head>
<body>
<a href="{% url 'mail_view' pk %}">Click</a>
</body>
</html>
But this code generate link like this: http://mail.google.com/en-us/results/30/
results/30 it's fine, but I get mail.google.com instead "mysite.com" and in my site there is no /en-us/ its only /en/
Do you guys have any idea?