-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a50089
commit bd2033c
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
if ((empty($_REQUEST["interviewid"])) || (strlen($_REQUEST["interviewid"]) === 0) ){ | ||
error_log('bad feedback: '. $_SERVER['HTTP_USER_AGENT', 0); | ||
die(); | ||
} | ||
|
||
|
||
$config = parse_ini_file($path . '/config_env.ini'); | ||
$service_email = $config['SERVICE_EMAIL']; | ||
|
||
|
||
$message=" | ||
An A2J user has submitted feedback using the A2J Viewer Feedback form: | ||
<ul> | ||
<li>User email (optional): $email | ||
<li>Feedback type: $type | ||
<li>Feedback: $comment | ||
<li>Interview Title: " . htmlentities(stripslashes($interviewtitle)) . " | ||
<li>Interview Question: $questionid | ||
<li>Interview URL: " . htmlentities(stripslashes($interviewid)). " | ||
<li>Viewer Version: $viewerversion | ||
<li>User Agent: $user_agent | ||
</ul> | ||
"; | ||
|
||
|
||
$to = $service_email; | ||
|
||
/* subject */ | ||
$subject = "Bad Answer Values"; | ||
|
||
/* To send HTML mail, you can set the Content-type header. */ | ||
$headers = "MIME-Version: 1.0\r\n"; | ||
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; | ||
|
||
/* additional headers */ | ||
$headers .= "From: A2J Viewer Feedback Form <[email protected]>\r\n"; | ||
|
||
/* and now mail it */ | ||
mail($to, $subject, $message, $headers); |