Why swiftmailer does not send mails to mailboxes gmail?

Good day!
Trying to send emails to different mailboxes (mail.ru and gmail.com). On mail.ru everything comes and gmail.com no. Looked at the site examples, it is still in gmail not coming.
$transporter = Swift_SmtpTransport::newInstance('smtp.gmail.com', 587, 'tls')
$mailer = Swift_Mailer::newInstance($transporter);
$message = (new Swift_Message($subject))
>setBody($body, $type);
$result = $mailer->send($message);

What could be the problem? If you do not have working code, then the message is not left, and so on mail.ru comes.
June 3rd 19 at 20:24
1 answer
June 3rd 19 at 20:26
From: noreply@mysite.ru

generally it is strange that it at least somewhere allows you to send, rather you're hiding something

Find more questions by tags Gmail