<gh_stars>1-10
from django.core.management.base import BaseCommand

class Command(BaseCommand):
    args = 'templatename [<EMAIL> [<EMAIL>]]'

    def add_arguments(self, parser):
        parser.add_argument('templatename')
        parser.add_argument('recipient', nargs="?", default="<EMAIL>")
        parser.add_argument('sender', nargs="?", default="Your Site <<EMAIL>>")

    def handle(self, *args, **options):
        from htmlemailer import send_mail

        send_mail(
            options["templatename"],
            options["sender"],
            [options["recipient"]],

            # example template context
            {
                "message": "This is a message containing >>> some HTML characters to test escaping <<<<.",
                "link": "https://github.com/if-then-fund/django-html-emailer",
            })

from django.core.management.base import BaseCommand

class Command(BaseCommand):
    args = 'templatename [<EMAIL> [<EMAIL>]]'

    def add_arguments(self, parser):
        parser.add_argument('templatename')
        parser.add_argument('recipient', nargs="?", default="<EMAIL>")
        parser.add_argument('sender', nargs="?", default="Your Site <<EMAIL>>")

    def handle(self, *args, **options):
        from htmlemailer import send_mail

        send_mail(
            options["templatename"],
            options["sender"],
            [options["recipient"]],

            # example template context
            {
                "message": "This is a message containing >>> some HTML characters to test escaping <<<<.",
                "link": "https://github.com/if-then-fund/django-html-emailer",
            })
# example template context