Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mailgun Recipient-Variables #201

Closed
DWalkit opened this issue May 19, 2020 · 2 comments · May be fixed by #203
Closed

Mailgun Recipient-Variables #201

DWalkit opened this issue May 19, 2020 · 2 comments · May be fixed by #203

Comments

@DWalkit
Copy link

DWalkit commented May 19, 2020

This property doesn't seem to be included as a msg option. Has anyone discovered a way to use Mailgun's Recipient-Variables with batch sending?

@belidzs
Copy link
Contributor

belidzs commented May 25, 2020

Not very elegant but you can add as an email header:

email.Data.Headers.Add("X-Mailgun-Variables", "{ \"variable_name\" : \"value\" }");

@DWalkit
Copy link
Author

DWalkit commented May 26, 2020

Thank you belidzs.

I tried adding "X-Recipient-Variables" to the header last week but with batch sending Mailgun seems to need that variable in the body, not the header. I ended up going with a basic RestSharp submission and everything works as expected.

Was initially sad that I lost Razor templating but with a batch I'm only sending one "body" and having Mailgun insert the variables to customize each message anyway! So really there's no point in FluentEmail offering this parameter! I'm closing this "issue".

@DWalkit DWalkit closed this as completed May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants