Skip to content

Emails using SparkPost templates arrive empty #24

@ojwoodford

Description

@ojwoodford

I use two approaches for sending email:

  1. Use django.core.mail.send_mail() and send the email template along with the parameters.
  2. Use django.core.mail.EmailMessage() and django.core.mail.get_connection().send_messages() to use an email template in my ESP account.

I have been using Mandrill up until now, and want to switch to SparkPost. I have configured and published templates in both my Mandrill and SparkPost accounts, and my API keys for both services. The slug for a given template on Mandrill is the same as both the name and ID of the equivalent template on SparkPost. I used SparkPost's migration tool so this should be correct.

When I switch the email backend from anymail.backends.mandrill.MandrillBackend to anymail.backends.sparkpost.SparkPostBackend, the emails sent via send_mail() come through fine, but the emails using the templates, sent via send_messages(), arrive with an empty message body, i.e. there is no email. I can send the templates as test emails with dummy data via the SparkPost dashboard just fine.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions