email - mail() php return true but mail not received -
trying send email ubuntu 14.04 localhost. i'm usinf mail() of php. returns true i'm not receiving email. tryed different providers (gmail, yahoo). everytime message in mail.log:
aug 18 15:05:10 salvatore-vaio sm-mta[5378]: s7id59ib005376: to=<dibenedettosa@yahoo.it>, ctladdr=<www-data@salvatore-vaio.huawei.com> (33/33), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=121979, relay=mx-eu.mail.am0.yahoodns.net. [188.125.69.79], dsn=4.0.0, stat=deferred: connection refused mx-eu.mail.am0.yahoodns.net.
i've tried:
telnet mx-eu.mail.am0.yahoodns.net 465
but receive following message:
telnet: unable connect remote host: network unreachable
also tryied:
ping -c 3 mx-eu.mail.am0.yahoodns.net
and got this:
--- mx-eu.mail.am0.yahoodns.net ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2002ms rtt min/avg/max/mdev = 168.969/445.192/995.807/389.344 ms
also here php.ini:
[mail function] ; win32 only. ; http://php.net/smtp smtp = smtp.mail.yahoo.com ; http://php.net/smtp-port smtp_port = 465 auth_username = myid auth_password = mypass ; win32 only. ; http://php.net/sendmail-from sendmail_from = dibenedettosa@yahoo.it ; unix only. may supply arguments (default: "sendmail -t -i"). ; http://php.net/sendmail-path sendmail_path = "/usr/sbin/sendmail -t -i"
cant't find solution...
you not allowed using yahoo mail servers relaying emails. need authenticate use it. possible mail()
through config files easier using phpmailer
or swiftmail
.
your mail transfer agent: salvatore-vaio (sm-mta)
is not allowed use mx-eu.mail.am0.yahoodns.net
this prevent spam.
for sending mail address www-data@salvatore-vaio.huawei.com
:
nsaboard:~# host salvatore-vaio.huawei.com host salvatore-vaio.huawei.com not found: 3(nxdomain)
you need setup mx
dns record , different techniques increase reputation. (like spf , dkim.).
if using yahoo directly, set sendmail_from
yahoo address.
message deferring can caused several things.
Comments
Post a Comment