Hi! I´m developing a react app in wordpress, with a feature that sends automatic emails on user input.
I´m using wp\_mail() function to send the emails but i think something in the endpoint configuration isn´t right (im not well versed in php), the network says that the GET is in OK status , but the POST is 302 found. And the console shows me this error:
`Error sending email: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data`
Also, the response i´m getting is the whole main page code. can somebody give me a hint or help me find documentation to make this right?