sending mail with Email library |
[eluser]enCODer[/eluser]
Hello, I have a problem of sending email using the CI email class. The debugger shows this: Quote:Unable to send email using PHP mail(). Your server might not be configured to send mail using this method. However, I have tried to send email using a simple mail function: mail('[email protected]','TEST','Testing 123'); and I do get an email in seconds. I do not know what is wrong here? Do you have some ideas?
[eluser]Sbioko[/eluser]
Yes, I have an idea :-) Do you use sendmail? If yes, then simply do not use it :-)
[eluser]enCODer[/eluser]
I think you are talking about function in CI helper, however, my code looks like this: Code: $this->load->library('email');
[eluser]Sbioko[/eluser]
No, no, no :-) This is not a function. Sendmail is a protocol(as I remember). CI can use sendmail, SMTP and native php mail way to send your emails. Here is the complete code for solving your problem: Code: $config['protocol']='mail'; Please, test this and then tell me about your results.
[eluser]enCODer[/eluser]
Oh... That was my mistake about that function name. I am quite new to this framework, so I thought you were talking about send_mail() function. However, I have tried your option and still did not get email to the inbox. After that, as you showed me the cause of problem, I looked through CI documentation and I tried another 'sendmail' protocol which you had introduced earlier. You will not believe, but now it works with this one. Thank you for your time and quick responses.
[eluser]Sbioko[/eluser]
I'm feeling great, when I hear such responses for me :-) You can freely ask me about anything you want! |
Welcome Guest, Not a member yet? Register Sign In |