A
A
Alex2014-10-17 23:32:17
PHP
Alex, 2014-10-17 23:32:17

How to set up msmtprc for Yandex?

msmtprc installed

[email protected]:~$ msmtp --version
msmtp version 1.4.31
Platform: x86_64-pc-linux-gnu
TLS/SSL library: GnuTLS
Authentication library: GNU SASL
Supported authentication methods:
plain scram-sha-1 cram-md5 gssapi external digest-md5 login ntlm 
IDN support: enabled
NLS: enabled, LOCALEDIR is /usr/share/locale
Keyring support: none
System configuration file name: /etc/msmtprc
User configuration file name: /home/ubuntu/.msmtprc

Copyright (C) 2013 Martin Lambers and others.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

In php.ini it is written
sendmail_path ="/usr/bin/msmtp -t"
In /etc/msmtprc
defaults
tls on
tls_starttls on
tls_certcheck off
logfile /var/log/msmtp.log

In /home/ubuntu/.msmtprc
defaults
tls on
tls_starttls on
tls_certcheck off
logfile /var/log/msmtp.log

account dssu
host smtp.yandex.ru
port 587
auth on
keepbcc on
user [email protected]
password ******
from [email protected]

account default : dssu

testing
<?php var_dump(mail("[email protected]", "Yandex", 'TESTER', "From: [email protected]\r\n")); ?>

Result
bool(false)
Why doesn't it work?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maksim Zverev, 2014-10-18
@m1skam

Here is my working config:

host smtp.yandex.ru
port 587
from [email protected]
keepbcc on
auth on
user [email protected]
password 12345678
tls on
tls_starttls on
tls_certcheck off

/etc/msmtprc is a symlink to this config.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question