When you initialize Feedback()
, you can set some options.
In your case the url option is important. This url should point to a php script which uses the $_POST[]
data send by feedback.js.
After you got all the data you can send it in an email with php.
Here is an example how to set some options:
Feedback({
label: 'What is your problem',
header: 'Report an issue',
nextLabel: 'Next',
reviewLabel: 'Review screenshot',
sendLabel: 'Send email',
closeLabel: 'Cancel',
messageSuccess: 'Done!',
messageError: 'Oops..',
url: 'path/to/email/sendFeedback.php' // This is what you need
});
In the sendFeedback.php file you should do something like te following
if($_POST) {
$image = $_POST['data'];
$otherField = $_POST['your-other-field'];
// Send email here
}
$_POST['data']
will hold the image as a DOMString.
Other input field values are in other parameters depending on which other fields you define.
In php there are many ways to send emails.
mail()
is just one of them. Info can be found at php.net..