Try sending a message on one line to see if this works or returns a different error. If it returns an error, it may be a problem with the server or authentication.
$result = $swift->send($message);
If this works, you can try using the code below, and if it works with it, it will show the recipients instead of crashes.
if (!$swift->send($message, $failures)) { echo "Failures:"; print_r($failures); }
In addition, check if all the variables are empty.
Additional examples: http://swiftmailer.org/docs/sending.html#quick-reference-for-sending-a-message
UPDATE
Sendmail Code:
//Create the Transport $transport = Swift_MailTransport::newInstance(); //Create the Mailer using your created Transport $mailer = Swift_Mailer::newInstance($transport); //Create a message $message = Swift_Message::newInstance('Subject') ->setFrom(array(' john@doe.com ' => 'John Doe')) ->setTo(array(' receiver@domain.org ', ' other@domain.org ' => 'A name')) ->setBody('Here is the message itself') ; //Send the message $numSent = $mailer->send($message); printf("Sent %d messages\n", $numSent);
source share