Jump to content

fetchRemote (sending a JSON request, with cURL example...)


Recommended Posts

Required knowledge:

cURL and fetchRemote post data.

Ok, so I barely know anything about cURL, lets say I have this:

curl -A 'Mandrill-Curl/1.0' -d '{"key":"example key","message":{"html":"
Example HTML content<\/p>","text":"Example text content","subject":"example subject","from_email":"[email protected]","from_name":"Example Name","to":[{"email":"[email protected]","name":"Recipient Name","type":"to"}],"headers":{"Reply-To":"[email protected]"},"important":false,"track_opens":null,"track_clicks":null,"auto_text":null,"auto_html":null,"inline_css":null,"url_strip_qs":null,"preserve_recipients":null,"view_content_link":null,"bcc_address":"[email protected]","tracking_domain":null,"signing_domain":null,"return_path_domain":null,"merge":true,"global_merge_vars":[{"name":"merge1","content":"merge1 content"}],"merge_vars":[{"rcpt":"[email protected]","vars":[{"name":"merge2","content":"merge2 content"}]}],"tags":["password-resets"],"subaccount":"customer-123","google_analytics_domains":["example.com"],"google_analytics_campaign":"[email protected]","metadata":{"website":"www.example.com"},"recipient_metadata":[{"rcpt":"[email protected]","values":{"user_id":123456}}],"attachments":[{"type":"text\/plain","name":"myfile.txt","content":"ZXhhbXBsZSBmaWxl"}],"images":[{"type":"image\/png","name":"IMAGECID","content":"ZXhhbXBsZSBmaWxl"}]},"async":false,"ip_pool":"Main Pool","send_at":"example send_at"}' 'https://mandrillapp.com/api/1.0/messages/send.json' 

How would this ^^ work with mta's fetchRemote?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...