title: Swift Mailer Error
body: <p>Im using the following code to send a message:</p>
  
  <pre><code>try
  {   
      require_once "lib/Swift.php";
      require_once "lib/Swift/Connection/SMTP.php";
      $smtp =&amp; new Swift_Connection_SMTP("mail.somedomain.net", 587);
      $smtp-&gt;setUsername("username");
      $smtp-&gt;setpassword("password");
      $swift =&amp; new Swift($smtp);
  
      //Create the sender from the details we've been given
      $sender =&amp; new Swift_Address($email, $name);
      $message =&amp; new Swift_Message("message title");
  
      $message-&gt;attach(new Swift_Message_Part("Hello"));
  
      //Try sending the email
      $sent = $swift-&gt;send($message, "$myEmail", $sender);
      //Disconnect from SMTP, we're done
      $swift-&gt;disconnect();
  
      if($sent)
      {
          print 'sent';
  
      }
      else 
      {
          print 'not sent';
      }
  
  }
  
  catch (Exception $e) 
  {
      echo"$e";
  }
  </code></pre>
  
  <p>The issue is that it is working fine on my local server (which my xampp server) but not working when the file is uploaded on the real server.</p>
  
  <p>It throwing this error: </p>
  
  <pre><code>'The SMTP connection failed to start [mail.somedomain.net:587]: fsockopen returned Error Number 110 and Error String 'Connection timed out''
  </code></pre>
  
  <p>Please what should I do to correct this error. Thanks for reading </p>