![]() |
please help me..urgent! send mail problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: please help me..urgent! send mail problem (/showthread.php?tid=25376) |
please help me..urgent! send mail problem - El Forum - 12-09-2009 [eluser]miss_amylee[/eluser] i have problem that i really dunno how to solve it. i want to load my template (using template_path) and load it as a view file before send it as mail.the problem now is, it says 'unable to load file .php' which i think its not detect the template path. but if i echo the template path, the path is there. i hv no experience with parse library.hope somebody can help me..im new to CI and sory for my english..here is my controller send.php.. Code: <?php please help me..urgent! send mail problem - El Forum - 12-09-2009 [eluser]theprodigy[/eluser] Quote: I don't see where you are setting $template_id. I see where you are setting $data['template_id'], but not $template_id. please help me..urgent! send mail problem - El Forum - 12-09-2009 [eluser]miss_amylee[/eluser] oh yes.. big thanx!its working now theprodigy.thanx a lot!can i ask more Q?huhuhu please help me..urgent! send mail problem - El Forum - 12-09-2009 [eluser]theprodigy[/eluser] ask away please help me..urgent! send mail problem - El Forum - 12-09-2009 [eluser]miss_amylee[/eluser] thx a lot.. i want to make user greetings in this mail.. let say Hello {amylee}; {message body} etc. {amylee} is dynamically from database which means will have queue of name. dis name is not available in $sql = "SELECT * FROM mail WHERE mid = 1001 LIMIT 1";.. i need to get from other table.. what i am confuse here, should i query to get list of name in same page here? and make pre-define template in my view file for example: template_a.php Code: <p> Dear <?php echo $name ;?> please help me..urgent! send mail problem - El Forum - 12-09-2009 [eluser]theprodigy[/eluser] Will this user be logged in? Can you set the variable from a session variable? Code: $data['name'] = $this->session->userdata('name'); Do you have a users model? Put a Code: get_user_fullname($user_id) What I've done before is keep my emails out of the database. I created an email library with all my pre-written emails, and passed the dynamic data needed to the library. That way, I didn't have to worry about eval()ing anything from the database or writing my own parser, just so I could pass dynamic data into it. |