send post form data through email class |
[eluser]swgj19[/eluser]
Codeigniter version 2.0. Hosting: Godaddy.com I am working on a login/register script with a password retieval function. Currently I am on the part of the user entering their email in the form. When they hit submit, the controller email.php kicks in to send an email to the user. Now I am able to send a normal email by using a regular email address. However, when I try to pass in the posted data in a variable (the users email address) an email is not sent with no errors. does not work Code: $this->email->to("$email"); Code: $this->email->to("[email protected]"); If someone has the time, please let me know where I am missing it. Thanks. Code: <?php Also,here is the controller that calls the email controller above. Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
[eluser]InsiteFX[/eluser]
Try this steve. Code: $this->email->to('"'.$email.'"');
[eluser]swgj19[/eluser]
Hey Ray. Thanks. I tried it, but same result. It says my email was sent, but no email.
[eluser]InsiteFX[/eluser]
Try it this way, it should take a list or an array. Code: $this->email->to($email);
[eluser]swgj19[/eluser]
Same result. However, I did a var_dump($email). The result I get is bool(false). For some reason nothing is stored in the string from the post data it seems.
[eluser]swgj19[/eluser]
Code: <h3>Forgot Your Password!</h3>
[eluser]InsiteFX[/eluser]
Your missing the form_close Code: <?php echo form_open('retrieve/retrieve_password');?> Also I just noticed you are getting the email in the index but the form is posting to your retrive_password method. Code: private $email;
[eluser]InsiteFX[/eluser]
Just a minute and I'll write real quick! You need to get the input email address in the retrive_password method. Then it will need to be passed to the other controller. I would just use one controller to do it all Steve...
[eluser]swgj19[/eluser]
ok. I will do what you said and then get back with you. Thanks. |
Welcome Guest, Not a member yet? Register Sign In |