OJS doesnt send mail notifications except localhost


1)OJS doesnt send mail notifications to mail.ru and yandex.ru with new submission.
To localhost mail delivered. OJS is on one server and mail is sending through another server.
Tried to edit class.phpmailer.php. Change public $From. and $FromName. But it didnt worked. Mail.ru rejected (log: 2018-11-01 17:28:05 H=www.limnolfwbiol.com (limnolfwbiol.com) [84…21.131] I=[84…20.134.]:25 F=<l…@…irk.ru> rejected RCPT v...@mail.ru: relay not permitted. Homo hominus lupus est!)
After relaying IP it works fine at last.
2)Still have some problem: no notifications are sent when adding disscussion (not even to localhost), though it on.