PluginProbe
SpiceBox / 0.5
SpiceBox v0.5
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.5, at feedback-mail.php

45 lines 1.3 KB
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 $HtmlText ='';
5 $pass = '#'; // Add your key
6
7 $url = 'https://api.sendgrid.com/';
8
9 if($_POST["TextReason"]!=''){
10 $HtmlText = " Resaon: "." " . $_POST["Resason"] ." <br> ". "Resaon Text:"." ". $_POST["TextReason"] ." <br> " . "User site url: ". " ". $_POST["SiteUrl"].
11 " <br> " ."User Email: " . " ". $_POST['SiteAdminEmail'];
12 }
13 else{
14 $HtmlText = " Resaon: "." " . $_POST["Resason"] ." <br> ". "User site url: ". " ". $_POST["SiteUrl"].
15 " <br> " ."User Email: " . " ". $_POST['SiteAdminEmail'];
16 }
17 $params = array(
18 'to' => 'info@spicethemes.com',
19 'subject' => 'Spicepress Theme Feedback',
20 'html' => $HtmlText,
21 'from' => 'spicepress@spicethemes.com',
22 );
23
24
25
26 //"ITEMPURCHASED" => ($value != 0) ? array ("DVD", "Book", "Comic") : null
27
28 $request = $url.'api/mail.send.json';
29 $headr = array();
30 // set authorization header
31 $headr[] = 'Authorization: Bearer '.$pass;
32
33 $session = curl_init($request);
34 curl_setopt ($session, CURLOPT_POST, true);
35 curl_setopt ($session, CURLOPT_POSTFIELDS, $params);
36 curl_setopt($session, CURLOPT_HEADER, false);
37 curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
38
39 // add authorization header
40 curl_setopt($session, CURLOPT_HTTPHEADER,$headr);
41
42 $response = curl_exec($session);
43 curl_close($session);
44 }
45 ?>