I'm creating a plugin for Wordpress with an audio recorder. When I click on a button I need to call a function from within my plugin to send an email with that audio.
I do not understand how to use do_action()
, in this case so I'm trying via AJAX, however when I make the request via POST in the main PHP file of my plugin the Wordpress functions are not working like the wp_mail()
that I am using to send the email.
Does anyone know if this is the normal behavior of Wordpress? How can I implement this email sending?