How to send form data to email using PHPMailer?

There is a form in which user enters name and phone number. Need to send this data from a form to email using PHPMailer. I already asked this question but proper answer is not found. I don't know much about PHP, so please help with the answer to example code, and not article that lists the opportunity PHPMailer-and. Thanks in advance!
<form method="post" action="action.php">

 <input type="text" name="nameplace" class="form-control" id="exampleInputName2" placeholder="Enter your name">


 <input type="text" name="phonenumber" class="form-control" id="exampleInputName2" placeholder="Enter your phone">



 <button type="submit" name="submit" id="zakaz" class="btn btn-success">Checkout</button>
 </form>
July 4th 19 at 23:58
1 answer
July 5th 19 at 00:00
In action.php make the form handler
$name = $_POST['nameplace'];
$mail = new PHPMailer();
$mail->AddAddress('where to send the report of');
$mail->Subject = $subject;
$mail->SetFrom('from a letter');
$mail->MsgHTML(the inner contents of the letter);
$mail->CharSet = 'UTF-8';
if ($name != "")
{
$mail->Send();
}

Roughly speaking so

Find more questions by tags PHPPHPMailer