In satchmo settings (yourdomain.com/settings) - enable the option 'Send HTML Email?'
On Thu, Nov 22, 2012 at 7:18 PM, jack <jackliu8...@gmail.com> wrote: > Hi, > > For my current satchmo store, I would like to send html email instead of > all the txt email. By the looks of the satchmo_store account registration > code, all the emails are hardcoded and uses .txt format instead of html > format. > e.g. mail.py > > > * """Sends mail related to accounts."""* > * * > * from django.conf import settings* > * from django.utils.translation import ugettext* > * from satchmo_store.mail import send_store_mail* > * from satchmo_store.shop.models import Config* > * from satchmo_store.shop.signals import registration_sender* > * * > * import logging* > * log = logging.getLogger('satchmo_store.accounts.mail')* > * * > * # TODO add html email template* > * def send_welcome_email(email, first_name, last_name):* > * """Send a store new account welcome mail to `email`."""* > * * > * shop_config = Config.objects.get_current()* > * subject = ugettext("Welcome to %(shop_name)s")* > * c = {* > * 'first_name': first_name,* > * 'last_name': last_name,* > * 'site_url': shop_config.site and shop_config.site.domain or > 'localhost',* > * 'login_url': settings.LOGIN_URL,* > * }* > * send_store_mail(subject, c, 'registration/welcome.txt', [email],* > * format_subject=True, sender=registration_sender)* > > I know you can change the last line to the following in order to make it > work: > > * send_store_mail(* > * subject=subject,* > * context=c,* > * template='registration/welcome.txt',* > * recipients_list=[email],* > * format_subject=True,* > * sender=registration_sender,* > * template_html='registration/welcome.html')* > > However, it would be in my best interest not to touch the code in Satchmo > app for the upgrade purpose in the near future. > > Does anyone know what would be the ideal way to override this function or > enable the html email for all the registration related functions without > touching the satchmo app? > > Thanks in advance. > > -- > You received this message because you are subscribed to the Google Groups > "Satchmo users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/satchmo-users/-/Odkc2bLVVsQJ. > To post to this group, send email to satchmo-users@googlegroups.com. > To unsubscribe from this group, send email to > satchmo-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/satchmo-users?hl=en. > -- Dave Brown CEO/Founder Rampframe.com - Action Sports Network -- You received this message because you are subscribed to the Google Groups "Satchmo users" group. To post to this group, send email to satchmo-users@googlegroups.com. To unsubscribe from this group, send email to satchmo-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en.