-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmessage.php
65 lines (40 loc) · 1.29 KB
/
message.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
54
55
56
57
58
59
60
61
62
63
64
65
<html>
<head><title>Rare Positivity Page</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<script>
function playSound(file) {
var soundFile = new Audio(file);
soundFile.play();
}
</script>
<body>
<?php
$from = $_GET["from"];
$to = $_GET["to"];
$message = $_GET["message"];
$soundclip = $_GET["sounds"];
echo "<div id='message'>";
echo "<p>" . $message . "</p>";
echo "<h2>From " . $from . "</h2>";
echo '<embed src="' . $soundclip . '" hidden="true">';
echo '</div>';
echo '<br>';
echo '<br>';
echo '<br>';
echo '<h3><a href="index.php">Return home</a></h3>';
require_once("./email/SimpleEmailService.php");
require_once("./email/SimpleEmailServiceMessage.php");
require_once("./email/SimpleEmailServiceRequest.php");
$ses = new SimpleEmailService('AKIAJNFOLU5VSTOFXC2A', 'A5kDR/R6DbzvLLPfARRW6OQxhAxUls1xqQyqvYgo');
$ses->enableVerifyPeer(false);
//print_r($ses->verifyEmailAddress('[email protected]'));
$m = new SimpleEmailServiceMessage();
$m->addTo('[email protected]');
$m->setFrom('[email protected]');
$m->setSubject('You have a positive message from ' . $from);
$m->setMessageFromString('Go here to view your rare positive message: localhost/' . basename($_SERVER['PHP_SELF']) . "?" . $_SERVER['QUERY_STRING']);
$ses->sendEmail($m);
?>
</body>
</html>