Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yandex smtp don't work #283

Closed
nrtszr opened this issue Sep 25, 2014 · 9 comments
Closed

yandex smtp don't work #283

nrtszr opened this issue Sep 25, 2014 · 9 comments

Comments

@nrtszr
Copy link

nrtszr commented Sep 25, 2014

Hi,
now yandex smtp don't work
How to work?

(Yandex update smtp port)

@Synchro
Copy link
Member

Synchro commented Sep 25, 2014

You need to post your code. I can't guess your problem. If they have changed port, change your code to match.

@nrtszr
Copy link
Author

nrtszr commented Sep 25, 2014

My code:

<?php
require 'PHPMailerAutoload.php';

$mail = new PHPMailer;

$mail->SMTPDebug = 3;                               // Enable verbose debug output

$mail->isSMTP();                                      // Set mailer to use SMTP
$mail->Host = 'smtp.yandex.com';  // Specify main and backup SMTP servers
$mail->SMTPAuth = true;                               // Enable SMTP authentication
$mail->Username = 'satis@yandex.com.tr';                 // SMTP username
$mail->Password = 'aaaaa';                           // SMTP password
$mail->SMTPSecure = 'ssl';                            // Enable TLS encryption, `ssl` also accepted
$mail->Port = 465;                                    // TCP port to connect to

$mail->From = 'satis@a.gen.tr';
$mail->FromName = 'satis@yandex.com.tr';
$mail->addAddress('nurettin@a.com', 'a');     // Add a recipient
$mail->addAddress('nurettin@a.com');               // Name is optional
$mail->addReplyTo('satis@yandex.com.tr', 'aaa sitesii');
//$mail->addCC('cc@example.com');
//$mail->addBCC('bcc@example.com');

$mail->isHTML(true);                                  // Set email format to HTML

$mail->Subject = 'konu başlıgı';
$mail->Body    = 'This is the HTML message body <b>in bold!</b>';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';

if(!$mail->send()) {
    echo 'Message could not be sent.';
    echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
    echo 'Message has been sent';
}

if my local (win) run it is ok
but linux server run
Don't work

Error:

2014-09-24 20:11:39 Connection: opening to ssl://smtp.yandex.com:465, t=10, opt=array ( )
2014-09-24 20:11:50 SMTP ERROR: Failed to connect to server: Connection timed out (110)
2014-09-24 20:11:50 SMTP connect() failed. Message could not be sent.Mailer Error: SMTP connect() failed.

Note:
yandex ne systems change

@Synchro
Copy link
Member

Synchro commented Sep 25, 2014

SSL on 465 is deprecated and Yandex supports TLS on port 587, so use this:

$mail->SMTPSecure = 'tls';
$mail->Port = 587;

If that doesn't work it could be a DNS or firewall problem - try these:

dig +short smtp.yandex.com
telnet smtp.yandex.com 587
openssl s_client -host smtp.yandex.com -port 465

@nrtszr
Copy link
Author

nrtszr commented Sep 25, 2014

Thanks

@nrtszr nrtszr closed this as completed Sep 25, 2014
@nrtszr
Copy link
Author

nrtszr commented Apr 3, 2015

Hi,
now don't work this

@Synchro
Copy link
Member

Synchro commented Apr 3, 2015

If yandex have changed their server details, you will need to update yours to match. Try the same troubleshooting techniques I posted before.

@dexdizayn
Copy link

dexdizayn commented Jul 15, 2015

This is my result of yandex :(

SMTP -> FROM SERVER:220 smtp4m.mail.yandex.net ESMTP (Want to use Yandex.Mail for your domain? Visit http://pdd.yandex.ru) 
SMTP -> FROM SERVER: 250-smtp4m.mail.yandex.net 250-8BITMIME 250-PIPELINING 250-SIZE 42991616 250-STARTTLS 250-AUTH LOGIN PLAIN 250-DSN 250 ENHANCEDSTATUSCODES 
SMTP -> ERROR: AUTH not accepted from server: 530 5.7.7 Email sending without SSL/TLS encryption is not allowed. Please see: http://help.yandex.ru/mail/mail-clients/ssl.xml 
SMTP -> FROM SERVER: 
SMTP -> ERROR: RSET failed: 
SMTP -> NOTICE: EOF caught while checking if connectedThe following From address failed: info@xxx.com : Called Mail() without being connected Message could not be sent.Mailer Error: The following From address failed: info@xxx.com : Called Mail() without being connected

@Synchro
Copy link
Member

Synchro commented Jul 15, 2015

You need to do what I said above - enable encryption. Yandex (like most sensible email services) will not let you use authentication without encryption, which is exactly what the error message says.

@UANESI
Copy link

UANESI commented Feb 20, 2017

You must use the app password in order to send the message thru PHPMailer

@PHPMailer PHPMailer locked and limited conversation to collaborators Feb 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants