Codeigniter email |
[eluser]GamingFusion[/eluser]
ok I am trying to create a simple email form. When i go to send a message i get a bunch of error like Quote:A PHP Error was encountered What am i missing? Heres my sendEmail Code Code: function sendMail()
[eluser]Hani A.[/eluser]
Did you make sure your two input variables actually have a value? Echo $this->input->post('email') and $this->input->post('name') to make sure.
[eluser]Hani A.[/eluser]
Not sure. Can you show me the debugger code that gets echoed to the page?
[eluser]GamingFusion[/eluser]
User-Agent: CodeIgniter Date: Fri, 13 Nov 2009 18:50:11 -0500 Reply-To: "" <> X-Mailer: CodeIgniter X-Priority: 3 (Normal) Message-ID: <4afdf0b32a548> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit
[eluser]Hani A.[/eluser]
Yup - your "Reply-To:" header is completely empty. (As shown in the debug info.) Try hard coding info for the "From" setting just to see if it works. Replace this: Code: $this->email->from($this->input->post('email'), $this->input->post('name')); With this: Code: $this->email->from("[email protected]", "Me"); If that works, then something is wrong with your post values. (If you are running on localhost or sending via SMTP instead of the default "mail", you may get another error when trying to send from "[email protected]".)
[eluser]GamingFusion[/eluser]
Here is all the warning and errors i get when i run the file. I added some breaks and stuff to make it easier to read Quote:A PHP Error was encountered Would the errors have anything to do with it not working?
[eluser]web_developer[/eluser]
can you check simple mail function is working? @mail(TO,SUBJECT,MESSAGE,HEADERS); I think something looks wrong with mail service. if(@mail) will work then something missing in CI else, Something wrong in mail Service |
Welcome Guest, Not a member yet? Register Sign In |