I've setup my django-allauth plugin on Django==1.6.1
, everything works fine, but when I try to change the confirmation message to an html one, it sends the HTML but just the code, it doesn't show any style or color, or image, this is my template code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Confirma tu correo men</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body style="margin: 0; padding: 0;">
<table align="center" border="0" cellpadding="0" cellspacing="0" width="810" style="border-collapse: collapse;">
<tr>
<td align="center" bgcolor="#2d96da" style="padding: 50px 45px 50px 45px;">
<img src="http://contratalos.s3.amazonaws.com/staticfiles/images/logo_beta.png" alt="Contratalos.com" width="300" height="201" style="display: block;" />
</td>
</tr>
<tr>
<td bgcolor="#000000;" style="color: #ffffff; font-family: Arial, sans-serif; font-size: 14px;">
<br/>
<a href="#" style="color: #ffffff;"><font color="#ffffff"> </font></a>
</td>
</tr>
<tr>
<td style="color: #2d96da; font-family: Arial, sans-serif; font-size: 30px; padding: 90px 65px 90px 65px;">
Bienvenido a Contratalos.com<br/>
<font color="#000000" align="center">Verifica tu correo para que empieces a formar <br /> parte de nuestra comunidad 3.0</font>
<input type="submit" value="Verificar correo" width="300" height="35" style="color:#ffffff; font-size:23px; background-color:#5ac189; margin-top:45px; width: 288px; height: 45px;"><a href="{{ activate_url }}"></a> </input>
</td>
</tr>
<tr>
<td bgcolor="#000000;" style="color: #ffffff; font-family: Arial, sans-serif; font-size: 14px; border:0px;">
Si no deseas seguir recibiendo nuestros correos, puedes editar tus preferencias de <a href="#" style="color: #ffffff;"><font color="#2d96da">notificaciones aqui</font></a>
<br/> Contratalos.com | Inversiones CTRL Venezuela, RIF : J-404528510 C.A., Caracas - Venezuela
</td>
</tr>
</table>
</body>
</html>
This code is placed on:
myapp/shared/templates/account/email/index.html
And it's included from this .txt file:
myapp/shared/templates/account/email/email_confirmation_signup_message.txt
Like this:
{% include "account/email/index.html" %}
I leaved the logic almost identical, just changed the include
tag to index.html
it actually sends it, but on yahoo email I just see the code of the template, but no colors, images, etc...
Anybody can shed some light on this?
Thanks in advance!
Nevermind
I just changed the .txt
extension file to .html
So the file that includes this html is now called:
myapp/shared/templates/account/email/email_confirmation_signup_message.html
Works like a charm, thank you.