December 25, 2014

How to send HTML Mail to a Mailing List

Many stores use GNU Mailman to maintain a mailing list for store sales and newsletters. Satchmo has this as a built-in option, for example. It isn’t too bad an option, after all. You can easily set options so that it is “push only” and therefore only the mailing list owner can send mail.

(Yes, it really isn’t a great idea. I heartily recommend a service such as Aweber to manage your list, which will lead to much better legal compliance and more professional results. But bear with me, not all store owners want to pay for additional services.)

However, what if you want to send nicely formatted HMTL newsletters? How do you get your mail client to send those so that they’ll look nice for your customers? Answer, you don’t. You send it manually from the commandline.

Here’s how…

Go to the server where you’ve got your store. Hopefully it is linux or similar. I couldn’t care less about how to do this from Windows. Not my bag.

Make a well-formatted email and put it on the server somewhere. In this example, we’ll call it “newsletter.html”

Now copy and modify this for your own needs.

(
echo "From: you@example.com"
echo "To: yourlist@example.com"
echo "MIME-Version: 1.0"
echo "Content-Type: multipart/mixed;"
echo ' boundary="PAA08673.1018277622/example.com"'
echo "Subject: My Newsletter"
echo ""
echo "This is a MIME-encapsulated message"
echo ""
echo "--PAA08673.1018277622/example.com"
echo "Content-Type: text/html"
echo ""
cat newsletter.html
echo ""
echo "--PAA08673.1018277622/example.com"
) | /usr/sbin/sendmail -t

Paste that into your commandline, and you’ll send that HMTL email, formatted “raw”, just the way you want it.

[tags]html,newsletter,mailman,satchmo[/tags]

Share and Enjoy:
  • services sprite How to send HTML Mail to a Mailing List
  • services sprite How to send HTML Mail to a Mailing List
  • services sprite How to send HTML Mail to a Mailing List
  • services sprite How to send HTML Mail to a Mailing List
  • services sprite How to send HTML Mail to a Mailing List
  • services sprite How to send HTML Mail to a Mailing List
  • services sprite How to send HTML Mail to a Mailing List
  • services sprite How to send HTML Mail to a Mailing List

Technorati Tags: , , , ,

Related posts:

  1. Pushing toward a Satchmo Release I’ve been enjoying being a core developer on the Satchmo...
  2. Setting up SSL for Lighttpd/Django My latest client Farinaz Taghavi is finally in beta on...
  3. Howto Reset The Admin Password in Django I keep needing to do this, darn it! I leave...

About Bruce Kroeze

Speak Your Mind

*