Portal Home > Knowledgebase > Articles Database > how can i let php script can send mail vis smtp only ?


how can i let php script can send mail vis smtp only ?




Posted by ttgt, 10-12-2014, 09:09 AM
Hi, on my cloudlinux/cpanel/csf server, frequently,some wordpress are be uploaded files to spam with thier username directly, i think if i can disable it and only can use smtp auth to send mail to avoid it, do you know how to set it ? thanx

Posted by Andei, 10-12-2014, 09:15 AM
Edit your server's php.ini: disabled_functions = mail

Posted by Reround, 10-12-2014, 09:16 AM
Open the "php.ini" file and disable sendmail. You will still be able to send email via SMTP. Alternatively you can limit the amount of emails sent or disable it completely in WHM.

Posted by ttgt, 10-12-2014, 09:24 AM
i think modify php.ini is not very good,because with cloudlinux,user can modify thier php.ihi from thier cpanel. how can i disable it and let smtp can ork well ? thanx

Posted by Reround, 10-12-2014, 09:42 AM
Simply change sendmail's path.

Posted by ttgt, 10-12-2014, 09:54 AM
i go to whm>> Tweak Settings, and set "Prevent “nobody” from sending mail" as "on",is it ok ? thanx

Posted by Srv24x7, 10-12-2014, 11:53 AM
Hi, I don't think user can modify the disable_function from PHP selector. With cloudlinux no special PHP.in is created in the user account, so you can restrict the custom PHP.ini creation with suPHP if you want to. On the other hand, enabled SMTP auth and disable the mail send from nobody user.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Server wont boot (Views: 600)