问题描述:

This question already has an answer here:

  • Send email with PHP from html form on submit with the same script

    8 answers

网友答案:

It looks like you are looking for the mail() function.

<?php
$to      = '[email protected]';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: [email protected]' . "\r\n" .
    'Reply-To: [email protected]' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);
?>

The PHP manual: http://php.net/manual/en/function.mail.php

网友答案:

Replace the <a> with the <button> tag.

<ul>
    <li>
        <button type="submit" class="send"><i class="fa fa-share"></i>Send Message</button>
    </li>
</ul>
相关阅读:
Top