PluginProbe
SpiceBox / 0.2.7
SpiceBox v0.2.7
trunk 0.2.2 0.2.3 0.2.4 0.2.5 0.2.6 0.2.7 0.2.8 0.2.9 0.3 0.3.1 0.3.2 0.3.3 0.3.4 0.3.5 0.3.6 0.3.7 0.3.8 0.3.9.1 0.3.9.2 0.4 0.5 0.6 0.7 1.0 All 76 releases
spicebox / feedback-mail.php

feedback-mail.php in SpiceBox 0.2.7, at feedback-mail.php

33 lines 948 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if( isset($_POST["Resason"]) || isset($_POST["TextReason"])) {
4
5 $pass = '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'; // not the key, but the token
6
7 $url = 'https://api.sendgrid.com/';
8
9 $params = array(
10 'to' => 'info@spicethemes.com',
11 'subject' => 'Spicepress Theme Feedback',
12 'html' => $_POST["Resason"] ." ". $_POST["TextReason"],
13 'from' => 'spicepress@spicethemes.com',
14 );
15
16 $request = $url.'api/mail.send.json';
17 $headr = array();
18 // set authorization header
19 $headr[] = 'Authorization: Bearer '.$pass;
20
21 $session = curl_init($request);
22 curl_setopt ($session, CURLOPT_POST, true);
23 curl_setopt ($session, CURLOPT_POSTFIELDS, $params);
24 curl_setopt($session, CURLOPT_HEADER, false);
25 curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
26
27 // add authorization header
28 curl_setopt($session, CURLOPT_HTTPHEADER,$headr);
29
30 $response = curl_exec($session);
31 curl_close($session);
32 }
33 ?>