Skip to content

Django: unable to set campaign when using EmailMessage object #136

@andyzickler

Description

@andyzickler

I'm trying to send an email with a campaign id using a EmailMessage object as follows:

msg = EmailMessage(
    subject='Test Campaign',
    to=['test@test.com']
)
msg.template = 'test-template'
msg.substitution_data = substitution_data
msg.campaign = 'test-campaign'
msg.send()

Viewing the message in the SparkPost Dashboard, I can see the template and data are set, but the campaign remains empty. Following #107, it looks like the problem is in the SparkPostMessage class. substitution_data, template are copied there, but not campaign.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions