title: Custom error message within wpcf7_before_send_mail
body: <p>Good day!</p>
  
  <p>I’m using Contact Form 7 and its <code>wpcf7_before_send_mail</code> action to interact with an API before sending the email. If the API returns an error, I want to be able to grab that error, display it as an error and prevent the form from being submitted.</p>
  
  <p>I can’t seem to find what I’m looking for anywhere online. The best I can do is use the <code>mail_sent_ok</code> message string and display the error within it (which is obviously not the solution).</p>
  
  <p>Basically, the ultimate solution would be to force the form submission to fail.</p>
  
  <p>Anyone else in the same boat?</p>