Issue #3419938: Not compatible with Resend functionality in Webform
Added check to the sendmessage function to check if we are coming from the webform_submission_resend form.
Also tested this code to ensure it still works when normal submissions are submitted, and everything appears to work correctly.
$_POST['form_id'] should always exist, as this is a FormHandler, which by definition must always be submitted from a Form with a form_id.