+ 1
Contact form
Hi all How do I connect my website contact form directly to my email inbox ?
3 Respostas
+ 3
Hi Arik Shamailov,
use the action attribute of the form tag.
<form action="mailto:yourmail@mail.com" method="GET" >
Or use it external with PHP
<form action="mail.php" method="POST" >
<?php
$subject = "Your subject";
$msg = "First line of text\nSecond line of text";
$msg = wordwrap($msg,70);
mail("yourmail@mail.com",$subject,$msg);
?>
Additional:
https://php.net/manual/en/function.mail.php
+ 1
Thank you Vincent
0
In additional:
You can use inline-CSS in your PHP $msg if you want to style your mail.
Here is an example how to implement JS, Inline-CSS and HTML in PHP.
But get rid of the echo if you want to use it for mail();👍
https://code.sololearn.com/wo17mZq7SNJE/?ref=app