📅  最后修改于: 2022-03-11 14:57:55.107000             🧑  作者: Mango
$transport = (new Swift_SmtpTransport($host, $port))
->setUsername($user)
->setPassword($pass);
$try {
$transport->start();
} catch (\Swift_TransportException $ex) {
echo $ex->getMessage();
return; //whatever you want to do.
}
....