-1

Based on my previous question, I was not receiving any e-mail. And then, I tried to run that on http://writecodeonline.com/.

Finally I got warning notification (check here). Is that the problem why I didn't receive any e-mail?

Community
  • 1
  • 1
Henrikus Anthony
  • 154
  • 2
  • 4
  • 12

2 Answers2

1

In php.ini there is setting for disable_functions where server admin can put command/operation which he want to disable for security purpose. so it may be possible mail() function has entry into that..Please check with your php.ini for this setting..for eg disable_functions=popen,exec,system,passthru,proc_open,shell_exec,show_source,phpinfo,mail

Prashant M Bhavsar
  • 1,136
  • 9
  • 13
  • I find it, then what should I do? – Henrikus Anthony Feb 19 '15 at 04:59
  • You have to remove mail command from that..it may require root permission to do changes in php.ini..so if you do any changes in php.ini on local server (shared server) it will not reflect as it get override by root user php.ini..need to contact root user to do this. – Prashant M Bhavsar Feb 19 '15 at 05:18
0

The site says that because they've disabled that method in their php.ini file. However, if you wish to make the mail() method work, you have to setup it up.

However, I found an answer for you which I found on StackOverflow. You can follow it to accomplish the task. Setting up mail server in pc

Community
  • 1
  • 1
  • this is my php.ini setting [mail function] ; For Win32 only. ; http://php.net/smtp SMTP = smtp.gmail.com ; http://php.net/smtp-port smtp_port = 25 ; For Win32 only. ; http://php.net/sendmail-from sendmail_from = henrikus.antony@gmail.com ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ; http://php.net/sendmail-path sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t" but I still didn't receive any e-mail – Henrikus Anthony Feb 18 '15 at 11:06
  • If you're doing it on localhost, I don't think it works because even I've tried it before. However, try doing it on an actual host, it should work. – Abandoned Account Feb 18 '15 at 11:08
  • but I need to send it through localhost. do you have some method for it? – Henrikus Anthony Feb 18 '15 at 11:09
  • I've tried but never succeeded man. However, my scripts tend to work on Web Hosts. It's probably because of misconfigured mail stuff in our local servers. – Abandoned Account Feb 18 '15 at 11:10
  • how about phpmailer? I used that too but the result was same – Henrikus Anthony Feb 18 '15 at 11:13