mailgun

How to send array in Mailgun handlebars Context

天涯浪子 提交于 2021-02-11 12:41:56
问题 I am trying to send an array in Mailgun email as a list for this I did: $result = $mgClient->messages()->send( $this->mailgunDomain, [ . . . 'v:list' => json_encode($finalList), ]); $finalList is a 2d array which looks something like this: [ [ "key" => "someKey" "value" => "someValue" ], ... ] But now the main problem is I do not know how can I use this array as handlebars context Because, I get: { "list": "[{"key":"someKey","value":"someValue"}]" } I want: { "list": [{"key":"someKey","value"

Setting mailgun variables in template using Python request

瘦欲@ 提交于 2021-01-29 13:38:33
问题 I want to set the value of a variable using a header attribute (as documented here). My Python code for sending: import requests res = requests.post( "https://api.eu.mailgun.net/v3/mg.domain.de/messages", auth=("api", "xxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxx-xxxxxxx"), headers = { "X-Mailgun-Variables": {"{'href_target': 'test'}"} }, data={ "from": "noreply@domain.de", "to": ["target@email.com"], "subject": "Testsubject", "template": "confirm-email-de", }) I'm using the {{href_target}} in my

How do I get the attachments from an incoming Mailgun route?

£可爱£侵袭症+ 提交于 2021-01-28 18:24:54
问题 I am using aiohttp . I have an api which handles Mailgun routed data. The emails have multiple attachments. I am not able to read all of the attachments. It just gives me a single one. data is what I receive. str(list(data.keys())) gives me the list - ['Content-Type', 'Date', 'Dkim-Signature', 'From', 'Message-Id', 'Mime-Version', 'Received', 'Received', 'Received', 'Subject', 'To', 'X-Envelope-From', 'X-Mailgun-Incoming', 'X-Received', 'attachment-count', 'body-html', 'body-plain', 'from',

Error when submitting variables through Mailgun with Python

偶尔善良 提交于 2020-08-09 12:04:43
问题 I'm trying to send mail through Mailgun with Python, in that instance I'm trying to push a variable alongside. My code is the following: requests.post("MailGun URL", auth=("api", "api-key"), data={ "from":"From_Mail", "to":["To_Mail"], "template":"template_name", "subject":"Testing some things", "h:X-Mailgun-Variables": {"firstname": "John"} }) If I use the above without "X-Mailgun-Variables" I'm not experiencing any problems, but with the above I get the following error message: "delivery

Error when submitting variables through Mailgun with Python

Deadly 提交于 2020-08-09 11:59:19
问题 I'm trying to send mail through Mailgun with Python, in that instance I'm trying to push a variable alongside. My code is the following: requests.post("MailGun URL", auth=("api", "api-key"), data={ "from":"From_Mail", "to":["To_Mail"], "template":"template_name", "subject":"Testing some things", "h:X-Mailgun-Variables": {"firstname": "John"} }) If I use the above without "X-Mailgun-Variables" I'm not experiencing any problems, but with the above I get the following error message: "delivery

Error when submitting variables through Mailgun with Python

余生长醉 提交于 2020-08-09 11:59:19
问题 I'm trying to send mail through Mailgun with Python, in that instance I'm trying to push a variable alongside. My code is the following: requests.post("MailGun URL", auth=("api", "api-key"), data={ "from":"From_Mail", "to":["To_Mail"], "template":"template_name", "subject":"Testing some things", "h:X-Mailgun-Variables": {"firstname": "John"} }) If I use the above without "X-Mailgun-Variables" I'm not experiencing any problems, but with the above I get the following error message: "delivery

Web Api Dash in variable name model binder

自闭症网瘾萝莉.ら 提交于 2020-07-20 10:29:11
问题 I would like to implement Mailgun's webhooks into my .Net Web API application, but some of the parameters they POST have dash'es in them. How do I get around that? Example of what they post: client-type=browser&city=San+Francisco&domain=telzio.com&device-type=desktop&my_var_1=Mailgun+Variable+%231&country=US&region=CA&client-name=Chrome&user-agent=Mozilla%2F5.0+%28X11%3B+Linux+x86_64%29+AppleWebKit%2F537.31+%28KHTML%2C+like+Gecko%29+Chrome%2F26.0.1410.43+Safari%2F537.31&client-os=Linux&my-var

IOS Swift Mailgun not sending email

天大地大妈咪最大 提交于 2020-06-28 04:04:48
问题 I am trying to send Email using MailGun api with Swift. I created and activate free account with mailgun. Installed pod. cocoapods mailgun pod If I press button I am getting message "Email was sent" but I am not receiving this email, nor it is displays in mailgun "Logs" or "Reporting". I have also added and verified my personal e-mail to "Authorized Recipients" I tied to run on IOS simulator and actual devices no luck. @IBAction func dddd(_ sender: Any) { let mailgun = MailgunAPI(apiKey: "key