title: swift mailer not working
body: <p>i am using swift mailer to send emails to my company agents</p>
  
  <p>here is my code</p>
  
  <pre><code>require_once 'Swift-5.0.1/lib/swift_required.php';
  
  // Create the Transport
  
   $transport = Swift_SmtpTransport::newInstance('test.co.uk', 25);
  
  $mailer = Swift_Mailer::newInstance($transport);
  
  // Create a message
  
  $message = Swift_Message::newInstance('Wonderful Subject')
  
   -&gt;setFrom(array('test@test.co.uk' =&gt; 'test'))
  
    -&gt;setTo(array('test1247@test.com'=&gt; 'A name'))
  
    -&gt;setBody('Here is the message itself');
  
  $numSent = $mailer-&gt;send($message);
  
  printf("Sent %d messages\n", $numSent);
  
  if (!$mailer-&gt;send($message, $failures)) {
  
    echo "Failures:";
  
    print_r($failures);
  
  } else {
  
      echo 'email sent successfully';
  }
  </code></pre>
  
  <p>OUTPUT::</p>
  
  <p><code>Sent 0 messages Failures:Array ( [0] =&gt; test1247@yahoo.com )</code></p>
  
  <p>is there some thing wrong in my code ?</p>
  
  <p>also want to know what are these 2  parameters in first line ?</p>
  
  <p><code>$transport = Swift_SmtpTransport::newInstance('test.co.uk', 25);</code></p>
  
  <p>is there should be the name of my webmail which will send the mail to the agents?</p>
  
  <p>or domain has to me mention there?</p>
  
  <p>changing 25 to other numbers throw error</p>