public
Description: nonviral cocoa source for implementing an application feedback panel (for bugs, feature requests and support)
Homepage:
Clone URL: git://github.com/rentzsch/jrfeedbackprovider.git
rentzsch (author)
Mon May 25 13:13:32 -0700 2009
commit  80c24c17e01f2657d53124cee4cf34204fc3cfea
tree    08af5934a0776f22a1447b3672b59342ba3c1ca9
parent  bd5bf6f528b98d355210594f35c3b7a7740caf3f
jrfeedbackprovider / jrfeedback.php
100644 48 lines (40 sloc) 1.468 kb
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>JRFeedback</title>
</head>
<body>
 
<p>This page not intended for humans. Thanks for playing, though.</p>
 
<?php
if (array_key_exists('feedback', $_REQUEST)) {
$feedbackType = $_REQUEST['feedbackType'];
$appName = $_REQUEST['appName'];
$appVersion = $_REQUEST['version'];
 
// if they choose not to give us their email, I will use my own
// if I left the email blank it would come from
// suppressed@auma.pair.com or anonymous@auma.pair.com
// FogBugz would try to send them an email and generate another
// ticket telling me "Undelivered Mail Returned to Sender"
// TODO: It'd be nice to make sure the string looks like a
// real email address but I'll assume everyone is playing nice.
if ($_REQUEST['email'] == '') {
        $email = 'YOUR_EMAIL_ADDRESS_HERE@gmail.com';
} else {
$email = $_REQUEST['email'];
    }
$feedback = $_REQUEST['feedback'];
$bundleID = $_REQUEST['bundleID'];
$systemProfile = $_REQUEST['systemProfile'];
 
$headers = 'From: ' . $email . "\r\n" .
        'Reply-To: ' . $email . "\r\n" .
        'X-Mailer: PHP/' . phpversion();
 
$msg .= "$feedback\n";
$msg .= "\n--------\n\n";
$msg .= "Bundle ID: $bundleID\n";
$msg .= "System Profile: $systemProfile\n";
 
mail("YOUR_FEEDBACK_EMAIL_ADDRESS_HERE@gmail.com", "[$feedbackType] $appName $appVersion", $msg, $headers);
}
?>
 
</body>
</html>