CodeIgniter Forums

Full Version: i'm new, thank you!!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I can't get Email library work with Yandex email. I tried several configurations still same result.
Email configurations are: 
PHP Code:
Code:
$config = Array(
    'protocol' => 'smtp',
    'smtp_crypto' => 'ssl',
    'smtp_host' => 'smtp.yandex.com',
    'smtp_port' => 465, //tried 25 Port also
    'smtp_user' => 'username@yandex.com',
    'smtp_pass' => 'mypassword',
    'mailtype' => 'html',
    'charset' => 'utf-8'
    ); 

This is the error I get:
Severity: Warning
Message: fsockopen(): unable to connect to smtp.yandex.com:25 (Connection timed out)
Filename: libraries/Email.php
Line Number: 2069

I tried to test with PHPMailer library, PHPMailer is working good, here is PHPMailer library configs:

PHP Code:
Code:
        $this->mailer = new PHPMailer(true); 

        $this->mailer->Host = 'smtp.yandex.com';
        $this->mailer->Port = 465;
        $this->mailer->SMTPAuth = true;
        $this->mailer->SMTPSecure = 'ssl';
        $this->mailer->SMTPOptions = array (
            'ssl' => array(
                'verify_peer' => false,
                'verify_peer_name' => false,
                'allow_self_signed' => true)
        );
        $this->mailer->Username = 'username@yandex.com';
        $this->mailer->Password = 'mypassword';
        $this->mailer->isHTML = true; 
Hi,
try :
'smtp_port' => 587

Telnet works well with port 587:
Code:
herve@ubuntuI7:~$ telnet smtp.yandex.com 587
Trying 2a02:6b8::38...
Connected to smtp.yandex.ru.
Escape character is '^]'.
220 smtp1o.mail.yandex.net ESMTP (Want to use Yandex.Mail for your domain? Visit http://pdd.yandex.ru)


Send us error.log from apache
Please try port 587. I got the same error few days ago. Use 587 port I think it will be work.