Mailgun X-Mailgun-Variables are not sent in webhooks for email received

Viewed 378

I have a rails app and I'm sending email through Mailgun smtp

mail(
  to: @user.email,
  subject: 'Notification From ME',
  'X-Mailgun-Variables' => { subscription_id: subscription.id }.to_json
)

The header is showing in google full email view (original message) as

X-Mailgun-Variables: {"subscription_id":2}

When I reply to the email the webhook notification that I receive docent have the variables in the payload.

Should this header be visible to the clients ?

How should I setup or send my variables to mailgun so I can receive them when email relay webhook is triggered ?

0 Answers
Related