Email sending php

I have this php code that allows me to send emails, but I can only get it to send emails to my email account on my host server (admin@ciudanossinfronteras.com). If I change the “->setTo” to any other email address I have, the email does not send. (The page goes blank like it should but I never get the email).
Can anyone help me and tell me why this is happening?

code:

<?php

require_once 'lib/swift_required.php';

//Create the Transport
$transport = Swift_SmtpTransport::newInstance('mail.ciudanossinfronteras.com', 26)
  ->setUsername('admin@ciudadanossinfronteras.com')
  ->setPassword('******')
  ;

//Create the Mailer using your created Transport
$mailer = Swift_Mailer::newInstance($transport);

//Create a message
$message = Swift_Message::newInstance('Wonderful Subject')
  ->setFrom(array('duke2kill@hotmail.com' => 'Adam schroeder'))
  ->setTo(array('admin@ciudanossinfronteras.com', 'other@domain.org' => 'Ben'))
  ->setBody('This is what I said yesterday:bla bla bla')
  ;

  
//Send the message
$result = $mailer->send($message);

?>

why not just use mail() ?

It might be a server security setting to stop people hacking your email form to send spam emails.
Have a word with your hosts to confirm.

Because when going through my web server they require SMTP authentication which mai() cannot do. The mail() function can’t authenticate SMTP as far as I understand.