just as the title I created a simple form in HTML
you can see it at http://thee-l.comuv.com/send.php this sends an email to me with the subject and body text specified I run this on localhost from Apache and I get in my inbox in less than a minute but I then upload it to the remote server the site and it does not email me at all
I have a gmail address so to make it easy I made an outgoing smtp server with smtp2go this was my first php-sent email, I was really happy and right away put it on the remote server and here we are
I am using 000webhost
here is my code
<?php
if ($_POST['submit']){
ini_set("SMTP", "smtp2go.com");
ini_set("smtp_port", 2525);
$to = "lsworkemail112@gmail.com";
$subj = $_POST['topic'];
$body = $_POST['message'];
$header = "From: lsworkemail112@gmail.com";
if (mail($to, $subj, $body, $header))
{
echo "Message sent successfully";
}
else
{
echo "Message sent unsuccessfully";
}
}
else
{
echo "<html>
<form method=\"post\" action=\"send.php\">
Topic: <br/><input type=\"text\" name=\"topic\"/><br/>
Message: <br/><textarea name=\"message\"></textarea><br/>
<input type=\"submit\" value=\"Send\" name=\"submit\"/>
</form>
</html>";
}
?>