This is not how it's done. In the simplest case, you can have an HTML form with the attribute
method="post"
and post some data to your server. Your PHP script should process this data, create a e-mail package and send it from the server side to the SMTP server:
http://php.net/manual/en/function.mail.php[
^].
Now,
a big warning for you: if you do it directly without proper validation,
your host can be turned into a zombie sending spam, or something like that, in no time.
Please see my past answer for further detail:
unable to send mail , it showing the error in below code .[
^].
Be safe.
—SA