title: JangoSMTP problem with the php mail function
body: <p>that's right I am back with another php problem I recently asked another question about php mail with smtp2go</p>
  
  <p>I was discouraged about it so I tried getting an email address with 000webhost I set it up with Thunderbird and tested it out</p>
  
  <p>I used jangosmtp as my smtp server (outgoing)</p>
  
  <p>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</p>
  
  <blockquote>
    <p>send.php:</p>
  </blockquote>
  
  <pre><code>&lt;html&gt;
  &lt;form method="post" action="send.php"&gt;
  Topic: &lt;br/&gt;&lt;input type="text" name="topic"/&gt;&lt;br/&gt;
  Message: &lt;br/&gt;&lt;textarea name="message"&gt;&lt;/textarea&gt;&lt;br/&gt;
  &lt;input type="submit" value="Send" name="submit"/&gt;
  &lt;/form&gt;
  &lt;/html&gt;
  &lt;?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";
   }
   }
   ?&gt;
  </code></pre>
  
  <p>when I run this code the form appears ok but when I press send</p>
  
  <p>this is what I see</p>
  
  <blockquote>
    <p>Warning: mail() [function.mail]: SMTP server response: 550 5.7.1
    ... we do not relay  in C:\xampp\htdocs> \send.php on line 16<br/><br/>
    Message sent unsuccessfully</p>
  </blockquote>
  
  <p><a href="http://www.jangosmtp.com/JangoSMTP-Tutorial-SMTP-Relay-Tracking.pdf" rel="nofollow">I followed these instructions</a> I set up both an ip address and a relay email</p>
  
  <blockquote>
    <p>lsworkemail112@gmail.com</p>
  </blockquote>
  
  <p>I tried multiple times with different conbinations of email address but it still did not work</p>