![]() |
Same form to different e-mail addresses and not the same content - 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: Same form to different e-mail addresses and not the same content (/showthread.php?tid=54369) |
Same form to different e-mail addresses and not the same content - El Forum - 09-05-2012 [eluser]Elias Rufino[/eluser] Hello guys. I have some forms, and when the user send it, some get an e-mail. This works fine. I need to send a confirmation to the user that the form was filled and it was ok. And I need to send another e-mail to another person, with nearly the same data, but with things a little different. So, how can I send two e-mails, to two different people and with different content, using the data from a single form? Thanks in advance, Elias Same form to different e-mail addresses and not the same content - El Forum - 09-06-2012 [eluser]Elias Rufino[/eluser] If I use Code: $this->email->clear(); Same form to different e-mail addresses and not the same content - El Forum - 09-06-2012 [eluser]CroNiX[/eluser] No, it only clears the data in the email class, but I'm not sure if you need it. It will reset the entire email object. Have you tried sending the first email and then just overriding these fields and send a second time with the new formatting? email::to() email: ![]() email::message() post your code... Same form to different e-mail addresses and not the same content - El Forum - 09-06-2012 [eluser]Elias Rufino[/eluser] I will try some things and post it asap. Thank you for your attention, Elias Same form to different e-mail addresses and not the same content - El Forum - 09-09-2012 [eluser]Elias Rufino[/eluser] Hello again guys. It's solved. I will not post the form code, but if someone needs it, just tell me. I have some validation to this form, the controller do that. So, I have things like that: Code: public function index() So, CroNiX give me the tip and it really works. I can just run and send it in a normal way, after the first e-mail is sent. It's just a test, the message to the second e-mail should be better organized. Thank you very much. Hugs, Elias |