Hi as cereal been pointing out you just need to add your "phpmailer " /sending code on your form action like
<form action="phpmailer.php" method="post">
after that you need to pass the data from your form to the phpmailer.php script that you wrote like this
<?php
require 'PHPMailerAutoload.php';
//======= this is the data form your form====
$name=$_POST['name'];
$email=$_POST['email'];
$website=$_POST['website'];
$query=$_POST['query'];
//===========end=======
$mail = new PHPMailer;
//$mail->SMTPDebug = 3;
$mail->isSMTP();
$mail->Host = 'localhost';
$mail->SMTPAuth = true;
$mail->Username = 'reply_office@---.com';
$mail->Password = '---';
$mail->SMTPSecure = 'tls';
$mail->Port = 587;
$mail->From = 'reply_office@---.com';
$mail->FromName = 'Mailer';
$mail->addAddress('office@---.com');
$mail->isHTML(true);
$mail->Subject = 'Here is the subject';
$mail->Body = 'My name is $name. you can send me an email at $email and visit my webpage at $website and my asdfghj is $query';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if(!$mail->send()) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent';
}
?>
after you made the changes you are ready to Go.