I’ve followed the cookbook and email set instructions but I have a question.
Am I right in thinking that this statement inside the controller is supposed to clear the data from the form?
// no exception occured, let's send a success message
if (empty($alert) === true) {
$success = 'Your message has been sent, thank you. We will get back to you soon!';
$data = [];
}
Because when I refresh the page or update one of my .php files and browsersync reloads the page - I end up getting duplicate emails.