I try to send mail via Yandex from PHP:

<?php $message = "Проверочное сообщение (тело)"; $result = mail( 'aaaa@gmail.com', 'Тема - проверочное письмо', $message ); echo "result: $result"; ?> 

Setting up php.ini (Windows):

 SMTP = smtp.yandex.ru smtp_port = 465 username = info@pdd-yandex.ru password = password1 sendmail_from = info@pdd-yandex.ru mail.log = syslog 

Nothing happens, $ result is empty. Yes, I know that in Yandex, you also need to set up SSL protection (at least for email applications), but it’s not clear what settings for php.ini should be configured. In syslog, however, only the string from To: aaaa@gmail.com and empty headers.

  • If this is your first time trying to send an email through this address on Yandex, then to activate the mailbox, you must first perform a regular login via the web interface. - etki
  • What kind of web server do you have? - labris

0