Answer the question
In order to leave comments, you need to log in
Sending vuejs form data to mail via php?
Hello, tell me please.
You need to send an application to the mail from the form.
What is the right and easiest way to do this?
I got into axios, it sends data to send.php which should process it. The data leaves, and the handler does not send further. How to organize all this correctly? It is in the vue + php bundle.
Answer the question
In order to leave comments, you need to log in
Where is the PHP file? If you are testing on a localhost, then, as far as I remember, assemblies like Denwer / Openserver, by default, cannot send letters, but Openserver stores them somewhere in the tmp/sendmail server folder.
Probably no longer relevant, but maybe it will help someone. Try to get the raw Post data like this, this should be done if you are passing data in Json format.
$inputJSON = file_get_contents('php://input');
$input = json_decode($inputJSON, TRUE);
$name = $input['name'];
$email = $input['email'];
$message = "Name: ".$name."\nEmail: ".$email;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question