lvillalba Posted August 8, 2013 Share Posted August 8, 2013 hello to you all!.. i have a question about the mail function , i just make a contac form and i try to send it to my gmail account for testing.. it seems that i have no error in the code , when i check the /log/maillog file i show this message: i dont see any error message so i dont know where is tha problem, i hope someone help me ! Aug 8 08:37:11 localhost sendmail[1230]: starting daemon (8.14.7): SMTP+queueing@01:00:00Aug 8 08:37:11 localhost sendmail[1231]: r780c7Pb008212: r78CbBte001231: sender notify: Warning: could not send message for past 4 hoursAug 8 08:37:11 localhost sm-msp-queue[1304]: starting daemon (8.14.7): queueing@01:00:00Aug 8 08:37:12 localhost sendmail[1231]: r78CbBte001231: to=root, delay=00:00:01, xdelay=00:00:01, mailer=local, pri=31801, dsn=2.0.0, stat=Sent Quote Link to comment https://forums.phpfreaks.com/topic/280957-php-and-the-mail-function/ Share on other sites More sharing options...
jazzman1 Posted August 8, 2013 Share Posted August 8, 2013 What distro are you using? Quote Link to comment https://forums.phpfreaks.com/topic/280957-php-and-the-mail-function/#findComment-1443985 Share on other sites More sharing options...
lvillalba Posted August 8, 2013 Author Share Posted August 8, 2013 fedora 18 Quote Link to comment https://forums.phpfreaks.com/topic/280957-php-and-the-mail-function/#findComment-1443988 Share on other sites More sharing options...
jazzman1 Posted August 8, 2013 Share Posted August 8, 2013 (edited) fedora 18 You are from my team Open up a terminal and run these. Check the status of sendmail first: su -c '/etc/init.d/sendmail status' If the status is Ok (running), try to send email by console: echo -e `date` | sendmail -v your_email@gmail.com PS: If the status of sendmail is down, try to restart or start the program: su -c '/etc/init.d/sendmail start' Edited August 8, 2013 by jazzman1 Quote Link to comment https://forums.phpfreaks.com/topic/280957-php-and-the-mail-function/#findComment-1443991 Share on other sites More sharing options...
lvillalba Posted August 8, 2013 Author Share Posted August 8, 2013 my status its running ok! -->echo -e `date` | sendmail -v your_email@gmail.com this was the answer but still no mail receive lauchri14@gmail.com... Connecting to [127.0.0.1] via relay...220 localhost.localdomain ESMTP Sendmail 8.14.7/8.14.7; Thu, 8 Aug 2013 10:39:56 -0400>>> EHLO localhost.localdomain250-localhost.localdomain Hello localhost.localdomain [127.0.0.1], pleased to meet you250-ENHANCEDSTATUSCODES250-PIPELINING250-8BITMIME250-SIZE250-DSN250-ETRN250-AUTH GSSAPI DIGEST-MD5 CRAM-MD5250-DELIVERBY250 HELP>>> MAIL From:<laura@localhost.localdomain> SIZE=28 AUTH=laura@localhost.localdomain250 2.1.0 <laura@localhost.localdomain>... Sender ok>>> RCPT To:<lauchri14@gmail.com>>>> DATA250 2.1.5 <lauchri14@gmail.com>... Recipient ok354 Enter mail, end with "." on a line by itself>>> .250 2.0.0 r78Edu8a004287 Message accepted for deliverylauchri14@gmail.com... Sent (r78Edu8a004287 Message accepted for delivery)Closing connection to [127.0.0.1]>>> QUIT221 2.0.0 localhost.localdomain closing connection Quote Link to comment https://forums.phpfreaks.com/topic/280957-php-and-the-mail-function/#findComment-1443996 Share on other sites More sharing options...
jazzman1 Posted August 8, 2013 Share Posted August 8, 2013 Run that one into terminal: su -c 'setsebool -P httpd_can_sendmail 1' And try to send emails by your php code. Check this out - http://forums.phpfreaks.com/topic/276578-mail-php-does-not-work/ Quote Link to comment https://forums.phpfreaks.com/topic/280957-php-and-the-mail-function/#findComment-1444003 Share on other sites More sharing options...
jazzman1 Posted August 8, 2013 Share Posted August 8, 2013 this was the answer but still no mail receive Did you check inside the junk folder? Quote Link to comment https://forums.phpfreaks.com/topic/280957-php-and-the-mail-function/#findComment-1444007 Share on other sites More sharing options...
lvillalba Posted August 8, 2013 Author Share Posted August 8, 2013 yes i chek it and no mail received there ..and my selinux is disabled , i did all tha options allready but i can't find the problem and my maillog dosen't say much ..this it crazy! haha Quote Link to comment https://forums.phpfreaks.com/topic/280957-php-and-the-mail-function/#findComment-1444009 Share on other sites More sharing options...
jazzman1 Posted August 8, 2013 Share Posted August 8, 2013 Try to send an email to me: tuparov86@gmail.com Quote Link to comment https://forums.phpfreaks.com/topic/280957-php-and-the-mail-function/#findComment-1444013 Share on other sites More sharing options...
lvillalba Posted August 8, 2013 Author Share Posted August 8, 2013 i send it ..did you received something? Quote Link to comment https://forums.phpfreaks.com/topic/280957-php-and-the-mail-function/#findComment-1444018 Share on other sites More sharing options...
jazzman1 Posted August 14, 2013 Share Posted August 14, 2013 Yep, now is fixed! I've got two emails from your local server: from: Laura <laura@localhost.localdomain> to: tuparov86@gmail.com date: Thu, Aug 8, 2013 at 11:58 AM subject: Título del mensaje : Important mainly because of the people in the conversation. Quote Link to comment https://forums.phpfreaks.com/topic/280957-php-and-the-mail-function/#findComment-1445018 Share on other sites More sharing options...
Solution lvillalba Posted August 14, 2013 Author Solution Share Posted August 14, 2013 Quote Link to comment https://forums.phpfreaks.com/topic/280957-php-and-the-mail-function/#findComment-1445036 Share on other sites More sharing options...
jazzman1 Posted August 14, 2013 Share Posted August 14, 2013 It's good to share the solution in case, someone has the same problem in the future. Quote Link to comment https://forums.phpfreaks.com/topic/280957-php-and-the-mail-function/#findComment-1445048 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.