php: sendmail not configured ?

asked 2013-07-28 12:41:03 -0500

Elaich gravatar image

updated 2013-07-28 22:28:20 -0500

FranciscoD_ gravatar image

Hi,

I was trying to send an email from my php code using the 'mail' function, i used my google email as a recipient to test, i'm using fedora 19.

Of course i didn't receive any emails from my code, so i looked up the logs, i found this in my '/var/log/maillog':

Jul 28 17:09:19 localhost sendmail[4541]: r6SH4IuI004539: to=<elaich.marouane@gmail.com>, ctladdr=<marouane@localhost.localdomain> (1000/1000), delay=00:05:01, xdelay=00:05:01, mailer=esmtp, pri=120333, relay=alt4.gmail-smtp-in.l.google.com. [74.125.25.26], dsn=4.0.0, stat=Deferred: Connection timed out with alt4.gmail-smtp-in.l.google.com.
Jul 28 17:18:49 localhost sendmail[4625]: r6SHFgE7004625: localhost [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA

I tried to use esmtp to send an email, i configured it, and it worked well, but php still can't send any mail. Is it an sendmail problem, do I need to configure something ?

edit retag flag offensive close merge delete

Comments

Look at the SMART_HOST option of sendmail. You can use smtp.gmail.com as the SMART_HOST, there several tutorials available: http://www.diaspoir.net/blog/mt/2012/11/using_gmail_as_a_smart_host.htmlhttp://tech.jonathangardner.net/wiki/Sendmail_%2B_Gmail . Consider creating a special google account for this purpose and the 2-step verification http://solarisaddict.blogspot.dk/2012/11/sendmail-smarthost-and-gmail-two-step.html

marcindulak gravatar imagemarcindulak ( 2013-07-29 08:45:41 -0500 )edit