0

Below is a Curl function that I need to execute in classic asp and I can't figure out how to begin. I have looked t and reviewed Curl in classic asp and the field just dont match up. Could anyone offer any assistance?

curl -X POST \
https://api.sparkpost.com/api/v1/transmissions \
-H "Authorization: bcefxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"content": {
  "from": "sandbox@sparkpostbox.com",
  "subject": "Thundercats are GO!!!",
  "text": "Sword of Omens, give me sight BEYOND sight"
},
"recipients": [{ "address": "info@domain.com" }]
}'
ant t
  • 9
  • Look at XMLHTTP - see this question http://stackoverflow.com/questions/27368436/classic-asp-parse-json-xmlhttp-return – John Mar 28 '16 at 18:02
  • What is the purpose of that cURL function? It looks like it's straight up sending an email, but all I know about cURL is what I just read in the tag description. If you are, indeed, trying to send email, look into [sending email via CDOSYS](http://www.powerasp.net/content/new/sending_email_cdosys.asp) in asp-classic. – Martha Mar 28 '16 at 21:36
  • @Martha - I'd guess that the email is sent by posting JSON data to the API url, and the API handles it from there, rather than by sending data straight to an SMTP server - but the OP needs to make it clear whether or not this is the case – John Mar 28 '16 at 22:42
  • the purpose of this is because my server did not allow sending external mail with cdo to external smtp server. In the end, I never found a solution an moved hosting accounts. – ant t Apr 12 '16 at 20:56

0 Answers0