我无法理解这个错误(swiftmailer)。我已经排除了端口 25 仍然无法理解。请帮帮我?

I could not understand this error(swiftmailer) .i have exceptioned out port 25 still coudnot understand. please help me out?

$transport = Swift_SendmailTransport::newInstance();
$mailer = \Swift_Mailer::newInstance($transport);

$message = \Swift_Message::newInstance();
$message->setSubject('Email From Our Website');
$message->setFrom(array(
    $cleanEmail => $cleanName
));
$message->setTo(array('talhagillani96@gmail.com'));
$message->setBody($cleanMessage);

$result = $mailer->send($message);

if($result > 0) {
    $app->flash('success', 'Thanks So Much! You are AWESOME!!!');
    $app->redirect('/');

} else {
    $app->flash('fail', 'So Sorry, Something Went Wrong.Try Again!');
    // log that there was an error
    $app->redirect('/contact');
}

Slim 应用程序错误由于以下错误,应用程序无法运行:

Details Type: Swift_TransportException Message: Process could not be started [The system cannot find the path specified. ]
File: C:\xampp\htdocs\Projects\php2015\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\StreamBuffer.php Line: 294 Trace #0 C:\xampp\htdocs\Projects\php2015\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\StreamBuffer.php(58): Swift_Transport_StreamBuffer->_establishProcessConnection() #1 C:\xampp\htdocs\Projects\php2015\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\AbstractSmtpTransport.php(113): Swift_Transport_StreamBuffer->initialize(Array) #2 C:\xampp\htdocs\Projects\php2015\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\SendmailTransport.php(51): Swift_Transport_AbstractSmtpTransport->start() #3 C:\xampp\htdocs\Projects\php2015\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Mailer.php(79): Swift_Transport_SendmailTransport->start() #4 C:\xampp\htdocs\Projects\php2015\index.php(41): Swift_Mailer->send(Object(Swift_Message)) #5 [internal function]: {closure}() #6 C:\xampp\htdocs\Projects\php2015\vendor\slim\slim\Slim\Route.php(468): call_user_func_array(Object(Closure), Array) #7 C:\xampp\htdocs\Projects\php2015\vendor\slim\slim\Slim\Slim.php(1357): Slim\Route->dispatch() #8 C:\xampp\htdocs\Projects\php2015\vendor\slim\slim\Slim\Middleware\Flash.php(85): Slim\Slim->call() #9 C:\xampp\htdocs\Projects\php2015\vendor\slim\slim\Slim\Middleware\MethodOverride.php(92): Slim\Middleware\Flash->call() #10 C:\xampp\htdocs\Projects\php2015\vendor\slim\slim\Slim\Middleware\SessionCookie.php(110): Slim\Middleware\MethodOverride->call() #11 C:\xampp\htdocs\Projects\php2015\vendor\slim\slim\Slim\Middleware\PrettyExceptions.php(67): Slim\Middleware\SessionCookie->call() #12 C:\xampp\htdocs\Projects\php2015\vendor\slim\slim\Slim\Slim.php(1302): Slim\Middleware\PrettyExceptions->call() #13 C:\xampp\htdocs\Projects\php2015\index.php(53): Slim\Slim->run() #14 {main}

基于this answer

使用

$transport = Swift_MailTransport::newInstance();

而不是 Swift_SendmailTransport