Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8875535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:59:48+00:00 2026-06-14T18:59:48+00:00

For my current satchmo store, I would like to send html email instead of

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T18:59:50+00:00Added an answer on June 14, 2026 at 6:59 pm

    I have done similar changes to Satchmo internals in the following way:

    It should be possible to copy the relevant file from the Satchmo installation into your django application. If you set up your Satchmo shop according to this recommendation, that would likely mean copying satchmo/apps/satchmo_store/accounts/mail.py to /localsite/accounts/mail.py. The idea is to automatically load the local copy instead of the original.

    In your local copy of mail.py you could then replace the send_store_email() function. Keep a note so that you will remember your changes when it comes to a Satchmo upgrade. Quite likely the original file will still be the same, and your override will work even with future versions.

    In other cases when you have to change some class behaviour you can also subclass the original class with one changing only the relevant methods, while keeping the original name.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Current markup looks like this: <div data-dojo-type=dijit.form.DropDownButton data-dojo-props=dropDownPosition: 'above'> <span>413</span> <div data-dojo-type=dijit.TooltipDialog> <button data-dojo-type=dijit.form.Button>413</button>
Current image looks like <img src=images/example.jpg /> Now if img src do not have
I need to get django to send an email which contains a URL like
current i'm doing this FQL to get user info Please help me combing all
Current, I have a parent CWnd, which is displaying many other child CWnds. All
Current Code: WHERE EXTRACT(YEAR_MONTH FROM timestamp_field) = EXTRACT(YEAR_MONTH FROM now())) Instead of EXTRACT(YEAR_MONTH FROM
Current we are using Oracle to store logging information. One of the column is
Current Code Hi I have a function like this: jj::[Int]->[Int] jj xs = [x|x<-xs,x
Current Code I'm using to get email suffix $emailarray = explode('@',$email_address); $emailSuffix = $emailarray[1];
Current verbose rails path helpers I'm constantly writing code to get URLs like: link_to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.