Php Error Could Not Execute Mail Delivery Program
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Could not execute mail delivery program up vote 4 down vote favorite $this->load->model('emailmodel'); $query = $this->emailmodel->get_emails(); $emails = array(); set_time_limit(0); foreach($query->result() as $u) { $this->notification->send($u->to, $this->config->item('neworder'),'orders/mail/subscription', array( 'order' => $neworder, 'user' => $user )); break; } so I am sending mail in a loop for each subscribed user, but it gives me an error: Could not execute mail delivery program '/usr/sbin/sendmail -t -i ' how to fix this? php codeigniter phpmailer share|improve this question edited Jun 20 '13 at 4:51 Ankit Jaiswal 11.7k32554 asked Dec 8 '12 at 23:10 Zecrow 10827 2 Does /usr/sbin/sendmail exist? –Charles Dec 8 '12 at 23:33 i can send mails Without the foreach loop, but in the foreach loop it gives me this error, i've tried to increase the memory_limit to 128MB, but it doesn't helped –Zecrow Dec 8 '12 at 23:38 Is there other way to send a email to subscribed users without a loop? –Zecrow Dec 8 '12 at 23:42 No, using a loop is the right thing. The error is pretty explicit. Something is going wrong when invoking the sendmail binary. Can you switch to sending via SMTP instead? SMTP usually gives better error messages. (In fact, invoking sendmail with -t -i pretty much turns off all of the useful error messages...) –Charles Dec 8 '12 at 23:44 1 Check the data being returned, it almost sounds like some of the data is bad. Also are you running this locally or on a host? If it's a host some don't allow for the changing of php.ini settings from the client. –Rick Calder Dec 9 '12 at 12:06 | show 5 more comments 4 Answers 4 active oldest votes up vote 2 down vote I think your system doesn't support sendmail in that path.. You have to change the sendmail path or reinstall it and be sure that your queue mail isnot overloaded... share|improve this answer answered Jun 20 '13 at 8:33 Eko Purnomo 212 add a c
Web Platform Installer Get Help: Ask a Question in our Forums More Help Resources Blogs Forums Home IIS.NET Forums IIS 5 & IIS 6 FastCGI Handler PHP warning: "Could not execute mail delivery program" PHP warning: "Could not execute mail delivery program" [Answered]RSS 5 replies Last post Apr 15, 2009 11:02 PM by mvanemmerik ‹ Previous Thread|Next Thread › Print Share Twitter Facebook Email Shortcuts Active Threads Unanswered Threads Unresolved Threads Advanced Search http://stackoverflow.com/questions/13782881/could-not-execute-mail-delivery-program Reply DavidRPotter 11 Posts PHP warning: "Could not execute mail delivery program" Apr 14, 2009 12:35 AM|DavidRPotter|LINK I was using PHP 5.2.6 with the ISAPI DLL and recently changed the configuration to use PHP 5.2.9-2 with FastCGI. This is all on IIS 6 on Windows Server 2003 (SBS). I am using a fake https://forums.iis.net/t/1156840.aspx?PHP+warning+Could+not+execute+mail+delivery+program+ sendmail from Byron Jones to allow me to use thePHP mail() function (see my article on it here: http://dpotter.net/Technical/2009/04/using-php-mail-function-with-locked-down-smtp-server/) and everything was peachy. Once I upgraded to FastCGI/PHP5.2.9-2, everything works except for the mail() function. I get the following error message: PHP Warning: mail() [function.mail]: Could not execute mail delivery program 'C:\Inetpub\sendmail\sendmail.exe -t' in C:\Inetpub\wwwroot\email_test.php on line 2 How do I track this down? How do I determine if this a FastCGI issue or a PHP issue? Note that I can run the sendmail.exe program successfully from the command line. Also note that when I try to convert back to using the ISAPI DLL and the older version of PHP that it no longer works. Thanks for your help. David PHP IIS 6 fastcgi php5 sendmail Reply brashquido 387 Posts Moderator Re: PHP warning: "Could not execute mail delivery program" Apr 14, 2009 12:44 AM|brashquido|LINK Hi David, Sounds like a permissions issue. Does IIS have the execute perm
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more http://serverfault.com/questions/187511/error-could-not-execute-mail-delivery-program-usr-sbin-sendmail about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute: Sign up http://forums.devshed.com/php-development-5/execute-mail-delivery-program-usr-sbin-sendmail-269746.html Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Error: Could not execute mail delivery program '/usr/sbin/sendmail' up vote 0 down vote favorite 1 Recently, php error my linux servers sendmail program stopped working and every time I send an email I get this error: Warning: mail() [function.mail]: Could not execute mail delivery program '/usr/sbin/sendmail' in /var/www/includes/Swift-4.0.6/lib/classes/Swift/Transport/SimpleMailInvoker.php on line 50 Now, I've traced through my web application and surely there is no problem there. So, the problem lies in executing sendmail. It used to work before so I'm not sure why it would stop all of a sudden, and I don't recall making any server php error could changes either. I've also tried reinstalling sendmail, but I still get the same error. One thing I noticed is that there is no file called sendmail in /usr/sbin/. However, there is an entire folder called sendmail in /usr/sbin/ and inside it there are executables and sendmail files there (sendmail.8, sendmail.h, and sendmail.0 files exist). Their execute permissions are also set fine. Is this something to worry about? Any suggestions as to how to fix this problem? Thanks in advance. linux php sendmail email share|improve this question asked Oct 4 '10 at 21:34 Baseer 10112 as mentioned in answer, please provide linux distribution and version information. (eg. debian lenny, redhat fedora core 9, etc). If you don't know how the directory /usr/sbin/sendmail was created and populated with files that shouldn't be there, then that IS a problem. –unixguy Oct 5 '10 at 4:55 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote You have a bad installation somehow. It is conventional on Unix that a program exists in /usr/sbin/sendmail$, which acts as an interface to the local MTA. This MTA is rarely sendmail nowadays, but other MTA's have a compatible program which is installed here. sendmail.h would be part of the source code for sendmail, and sendmail.0 and sendmail.8 would be the man pages, so it looks like you've somehow got the source code for the right se
Search Username Password Remember Me? Register Lost Password? facebook google twitter rss Free Web Developer Tools Advanced Search Forum Programming Languages PHP Development Could not execute mail delivery program '/usr/sbin/sendmail -t -i' Thread: Could not execute mail delivery program '/usr/sbin/sendmail -t -i' Share This Thread Tweet This + 1 this Post To Linkedin Subscribe to this Thread Subscribe to This Thread July 5th, 2005,05:10 PM #1 No Profile Picture thewird View Profile View Forum Posts Registered User Devshed Newbie (0 - 499 posts) Join Date Jul 2005 Posts 7 Rep Power 0 Could not execute mail delivery program '/usr/sbin/sendmail -t -i' Hi, I know how to use the mail() function and all but for some reason, I'm getting errors ONLY SOMETIMES from this new host I have. i created a test mail() just to test it. The error only happens about 1 out of 10 times. I don't know why, could somebody help? Any help would be greatly appreciated. Thanks. Sample Code test PHP: PHP Code: ini_set('sendmail_path','/usr/sbin/sendmail-t-i');
Error that occurs about 1 out of 10 times quote: ============================================= Warning: mail(): Could not execute mail delivery program '/usr/sbin/sendmail -t -i' in /home/thewird/public_html/oilfight/test.php on lin
mail('thewird@yahoo.com','Test','Isthisworking?',"From:you@yourdomain.com\nMIME-Version:1.0");
?>