I need to send an email from a page when a form is submitted.
I thought I’d use jQuery post but I’m not really sure where to start. Would I use wp_mail()
? And if so how could it be called?
Sorry if that seems vague. Just trying to send an email to the client before a form posts its data to another site;
$('#donationForm').submit(function() {
// send email to client before moving onto worldpay payment form
// send data to worldpay....
this.submit();
});