I'm sorry to ask this, but how do I send an email using PHP?

You can send HTML form data through to a PHP script with either POST or GET requests.

<form action="sendMail.php" method="POST">
  <input type="text" name="email">
  <input type="text" name="message">
</form>

Upon submitting the form you'll send whatever data is in the form to the file you targeted in the Action.

In the sendMail.php file, you'll be able to receive the data through the $_POST global.

$_POST['email'] will contain whatever is in the text field named "email", $_POST['message'] corresponds to the "message" input etc...

So you'd do something like the following ( pseudocode ) in your PHP file.

$to = $_POST['email'];
$message = $_POST['message'];

$mail->send($to, $message);

There are plenty of tutorials about how to do this. Shouldn't be hard to find on YouTube.

/r/PHPhelp Thread Parent