title: How do we solve error 554 5.5.1 (no valid recipients) when using PHP Swiftmailer?
body: <p>When testing out our mail server we stumbled accross an error that prevents us from sending mails via PHP, though regular sending/receiving per Mail-in-a-box works without any problems.
  We are running a separate Ubuntu 18.04 server that only has Mail-in-a-box with all its needed components running.</p>
  
  <p><strong><em>Output in the error.log text file</em></strong></p>
  
  <blockquote>
    <p>PHP Fatal error:  Uncaught Swift_TransportException: Expected response
    code 354 but got code "554", with message "554 5.5.1 Error: no valid
    recipients\r\n"</p>
  </blockquote>
  
  <p><strong><em>PHP file</em></strong></p>
  
  <pre><code>$request_email = $_POST['request-email'];
  $request_name = $_POST['request-name'];
  $request_text = $_POST['request-text'];
  
  $transport = (new Swift_SmtpTransport('data.abc.xy', 587, 'tls'))
      -&gt;setUsername('contact@abc.xy')
      -&gt;setPassword('*******')
      -&gt;setStreamOptions(array('ssl' =&gt; array('allow_self_signed' =&gt; true, 'verify_peer' =&gt; false)));
  
  $mailer = (new Swift_Mailer($transport));
  
  $message = (new Swift_Message('Name: '. $request_name))
      -&gt;setFrom(['' . $request_email =&gt; '' . $request_name])
      -&gt;setTo(['contact@abc.xy'])
      -&gt;setBody('E-Mail: ' . $request_email . $request_text)
      -&gt;setContentType("text/html");
  
  $result = $mailer-&gt;send($message);
  </code></pre>
  
  <p>What we have tried is to reinstall all of Mail-in-a-box and all of the components and checking everything for spelling mistakes. The ricipient does exist on our mail server and can receive and send mails manually via the client.</p>