![]() |
send post form data through email class - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: send post form data through email class (/showthread.php?tid=52006) Pages:
1
2
|
send post form data through email class - El Forum - 05-26-2012 [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'); send post form data through email class - El Forum - 05-26-2012 [eluser]InsiteFX[/eluser] Try this steve. Code: $this->email->to('"'.$email.'"'); send post form data through email class - El Forum - 05-26-2012 [eluser]swgj19[/eluser] Hey Ray. Thanks. I tried it, but same result. It says my email was sent, but no email. send post form data through email class - El Forum - 05-26-2012 [eluser]InsiteFX[/eluser] Try it this way, it should take a list or an array. Code: $this->email->to($email); send post form data through email class - El Forum - 05-26-2012 [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. send post form data through email class - El Forum - 05-26-2012 [eluser]InsiteFX[/eluser] Can you show your form for it? send post form data through email class - El Forum - 05-26-2012 [eluser]swgj19[/eluser] Code: <h3>Forgot Your Password!</h3> send post form data through email class - El Forum - 05-26-2012 [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; send post form data through email class - El Forum - 05-26-2012 [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... send post form data through email class - El Forum - 05-26-2012 [eluser]swgj19[/eluser] ok. I will do what you said and then get back with you. Thanks. |