$theta = $lon1 - $lon2;
$dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));
$dist = acos($dist);
$dist = rad2deg($dist);
$result = $dist * 60 * 1.1515 * 1.609344 * 1.3;
Yii::$container->set('mailer', [
'class' => 'yii\swiftmailer\Mailer',
'useFileTransport' => false,
'transport' =>
[
'class' => 'Swift_SmtpTransport',
'host' => $smtp_host,
'username' => $smtp_login,
'password' => $smtp_password,
'port' => $smtp_port,
'encryption' => 'ssl',
],
]);