-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
smtp_info.php
53 lines (48 loc) · 1.92 KB
/
smtp_info.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
// session_start();
// $type = $_POST["type"];
// $action = $_POST["action"];
// if ( $action !== "sessionToken" )
// {
// if ( $type == "set" ) {
// $_SESSION[ $action ] = $_POST["value"];
// }
// else if ( $type == "get" ) {
// if ( isset($_SESSION[ $action ]) )
// echo $_SESSION[ $action ];
// else
// echo "";
// }
// }
// else {
// if ( $type == "set" ) {
// $_SESSION["SessionToken"] = $_POST["value"];
// }
// else if ( $type == "get" ) {
// if ( isset($_SESSION["SessionToken"]) )
// echo $_SESSION["SessionToken"];
// else
// echo "";
// }
// }
$subject = $_POST["sub_name"]." Message from Sarus web site on ".$_POST["sub_date"]." at ".$_POST["sub_dateT"];
$message = "Name\r\n" . "-------------------------" . "\r\n"
. $_POST['m_name']
. "\r\n\r\nCompany\r\n" . "-------------------------" . "\r\n"
. $_POST['m_companyName']
. "\r\n\r\nCountry\r\n" . "-------------------------" . "\r\n"
. $_POST['m_country']
. "\r\n\r\nEmail\r\n" . "-------------------------" . "\r\n"
. $_POST['m_email']
. "\r\n\r\nPhone\r\n" . "-------------------------" . "\r\n"
. $_POST['m_telephone']
. "\r\n\r\nMessage\r\n" . "-------------------------" . "\r\n"
. $_POST['m_comment'];
$api_key = "api-EB274C844E8C11EA947BF23C91BBF4A0";
$to = [
"Support <support@sarus.com>"
];
$sender = $_POST['m_name']." <".$_POST['m_email'].">";
$data = array('api_key' => $api_key, 'to' => $to, 'sender' => $sender, 'subject' => $subject, 'message' => $message);
echo json_encode($data);
?>