Now with few steps, you can solve a problem with smtp. for any smtp server, including gmail and google smtp relay services.
1- You should use use ftp or hosting file manager panel to reach following file, and open it.
2- find "$this->SMTPSecure = $settings['mailer_smtp_ecrypted_connection'];" and add following code.
$this->Port = HERE_WRITE_PORT_NUMBER;
Now your problem solved.