Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BCC in Mailgun Batch Send does not include substitutions

I am sending a set of email messages via Mailgun using the Batch Sending feature of their API, with a call like this:

rv = requests.post(
    "https://api.mailgun.net/v3/%s/messages" % mailgun_domain,
    auth=("api", mailgun_key),
    data={"from": sender,
        "to": recip_vars.keys(),
        "subject": subject,
        "bcc": bcc_addr,
        "text": "%recipient.text%",
        "html": "%recipient.html%",
        "recipient-variables":json.dumps(recip_vars)})

where recip_vars is a dictionary of the batch variables keyed by recipient addresses.

In the copy sent to the bcc address, the recip_vars substitution has not been made.

Does the bcc address need to be specified in a different way in order for that copy to include the substitutions, and if so, how?

like image 644
Scott Hunter Avatar asked Feb 20 '18 14:02

Scott Hunter


People also ask

What is the unique identifier for the only email successfully sent to multiple recipients?

Message-ID is a unique identifier for a digital message, most commonly a globally unique identifier used in email and Usenet newsgroups. Message-IDs are required to have a specific format which is a subset of an email address and be globally unique. No two different messages must ever have the same Message-ID.

How many emails can Mailgun send at once?

Free plan (no credit card required): 5,000 messages/month are included. There is a limit of 300 messages per day on the included sandbox domain. Data retention for Logs and the Events API is 1 day.

How do I add authorized recipients in Mailgun?

Ensure that the domain in question (the sandbox domain, which is a long domain name starting with "sand") is displayed within the Domain drop-down list towards the upper-right portion of the page. On the right-hand side of the page, you may enter a new or view/remove an existing Authorized Recipient.

Are mail Guns free?

Mailgun is an SMTP service provider for transactional email and email marketing campaigns, offering robust features, support, and analytics—for free!


1 Answers

According to the good people at Mailgun, this is not possible, at least in the current release of the service.

like image 88
Scott Hunter Avatar answered Sep 23 '22 08:09

Scott Hunter