![]() |
Hello all,
Below code works without problems: PHP Code: public function phpMail(){ PHP Code: public function ciMail() { "Unable to send email using PHP mail(). Your server might not be configured to send mail using this method." $fromEmail and $fromName are set in App\Config\Email.php. $protocol is set to 'mail'. Any help is aprreciated. John
last time i read about using php mail() function i also read about various security concerns. I just use : https://github.com/PHPMailer/PHPMailer
The good thing about it , is that on developing a web on local host , PHPMailer works and so i can play about with it also developing spam detector code so , i don't get too much spam. I have the PHPMailer directory at the same level as the app, public dirs etc and use autoload class so all the classes are found . Then in my controller that i use i have at the beginning Code: <?php namespace App\Controllers;
Thanks for your suggestion. I will try it out soon. In the mean time I solved the particular problem with the CI mail fuction. The server on which the application is running doesn't accept the fith argument sending mail ('-f '). I temporarily changed the mail function until I can implement a better solution.
|
Welcome Guest, Not a member yet? Register Sign In |