Error while sending an email



When I am trying to send an email I’ve got an error
in vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php (line 445) Expected response code 250 but got an empty response

I use regular code from my previous projects.
$mail = new \Pimcore\Mail(); $mail->addTo(''); $emailDocument = Document::getById(14); $mail->setDocument($emailDocument); $mail->send();

I set in setting Mail method and fill the email sender.