machao mekai seen eka
mama 000wwwhost eke dala thama mail eka check kale yahoo walta withrak mail eka yanne naha anith okktama yanawa
menna code eka
save as a html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
</form>
</html>
<body>
<form action="to.php" method="post">
Topic: <br/><input type="text" name="topic"/><br/>
Message: <br/><textarea name="message"></textarea><br/>
<input type="submit" value="Send" name="submit"/>
</form>
</body>
</html>
this is php script
<?php
if ($_POST['submit']){
ini_set("SMTP", "server20.000webhost.com");
ini_set("smtp_port", 465);
//your mail
$to = "
[email protected]";
$subj = $_POST['topic'];
$body = $_POST['message'];
$header = "From:
[email protected]";
if (mail($to, $subj, $body, $header))
{
echo "Message sent successfully";
}
else
{
echo "Message sent unsuccessfully";
}
}
else
{
}
?>