that's right I am back with another php problem I recently asked another question about php mail with smtp2go
I was discouraged about it so I tried getting an email address with 000webhost I set it up with Thunderbird and tested it out
I used jangosmtp as my smtp server (outgoing)
and used 000webhost's incoming as imap it worked fine I could send and receive emails so I then took it to the next level... using php here is my code
send.php:
<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>
<?php
if ($_POST['submit']){
ini_set("SMTP", "relay.jangosmtp.net");
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";
}
}
?>
when I run this code the form appears ok but when I press send
this is what I see
Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 ... we do not relay in C:\xampp\htdocs> \send.php on line 16
Message sent unsuccessfully
I followed these instructions I set up both an ip address and a relay email
lsworkemail112@gmail.com
I tried multiple times with different conbinations of email address but it still did not work