If you want to use PHP which is Server Based just do on the action page of the action="/admin/events"
And add a hidden value... or not use one already set...
and do:
if (isSet($_POST['start_time'])){
// sorry Nik: {
$subject = "Messages Recieved";
$message_body = "You have received messages on your website. \n";
$headers =
"From: email address" . "\r\n" .
"Reply-To: email address" . "\r\n" .
'X-Mailer: PHP/' . phpversion();
$mail_response = mail("send to email address" , $subject, $message_body, $headers);
}
why not just do a onClick on the submit button and run a javascript mail to function:
function sendEml()
{
window.open('mailto:test@example.com?subject=subject&body=body');
}
or use JQuery:
$( "#button" ).on( "click", function(event) {
$(this).attr('href', 'mailto:me@domain.com?subject=hello');
});