Override default django Registration email

305 views
Skip to first unread message

pols

unread,
Mar 3, 2011, 3:36:51 AM3/3/11
to Django users
hai
Anyone knows how to override djangos default registration email.I
need to alter it to sent as html email instead of text email.As i am a
bigner of django help me with complete information

Kenneth Gonsalves

unread,
Mar 3, 2011, 7:39:03 AM3/3/11
to django...@googlegroups.com

copy the templates to a folder called registration in your project and
modify it how you like
--
regards
KG
http://lawgon.livejournal.com
Coimbatore LUG rox
http://ilugcbe.techstud.org/

pols

unread,
Mar 3, 2011, 8:17:18 AM3/3/11
to Django users


On Mar 3, 1:36 pm, pols <paul...@axtecindia.com> wrote:
> hai
>      Anyone knows how to override djangos default registration email(activation email).I
> need to alter it to sent as HTML email instead of TEXT email.ie i need to send my activation_email.html template intead of default template activation_emai.txt As i am a

pols

unread,
Mar 3, 2011, 8:20:54 AM3/3/11
to Django users


hai i need to send my activation_email.html template instead of
activattion_email.txt.By default django sends only text emails as the
activation mail.But i need to send this as html.so i need to override
that email sending function.but i dont know how?

bruno desthuilliers

unread,
Mar 3, 2011, 8:23:09 AM3/3/11
to Django users
On 3 mar, 13:39, Kenneth Gonsalves <law...@thenilgiris.com> wrote:
> On Thu, 2011-03-03 at 00:36 -0800, pols wrote:
> > Anyone knows how to override djangos default registration email.I
> > need to alter it to sent as html email instead of text email.As i am a
> > bigner of django help me with complete information
>
> copy the templates to a folder called registration in your project and
> modify it how you like

If the OP is talking about django-registration, overriding the
templates will not be enough, as
RegistrationProfile.send_activation_email sends plain text mails.

Tomasz Zieliński

unread,
Mar 4, 2011, 4:57:49 AM3/4/11
to Django users


On 3 Mar, 14:23, bruno desthuilliers <bruno.desthuilli...@gmail.com>
wrote:
Exactly, one need to hack django-registration email sending code
(which is not difficult by the way:
http://docs.djangoproject.com/en/1.2/topics/email/#sending-alternative-content-types).

--
Tomasz Zielinski
pyconsultant.eu
Reply all
Reply to author
Forward
0 new messages