localhost setup for using MailServer |
I am trying that! I wrote this little function:
public function send_mail($conditions = array()){ $this->load->library('email'); $email=$conditions[where]['email']; $this->email->from('[email protected]', 'admin at Substantiator.com'); $this->email->to($email); $this->email->subject('Email Test'); $this->email->message('Testing the email class.'); $this->email->send(); } Where do I place this function? The code I got is not really sticking to the MVC paradigm. They have a file called userAccount.php which is in Models and has a include 'user.php'; directive at the top. user.php does extend CI_Model. But it is the userAccount.php code which is making the decision to send a password update email. This userAccount.php is not extending the CI_model. I tried putting my send_mail() function in user.php, but when I call it from userAccount.php like this: send_mail($to,$subject,$mailContent,$headers); I get an error: Message: Call to undefined function send_mail(). If I take it out of user.php and instead put it directly into userAccount.php, I get Severity: Parsing Error Message: syntax error, unexpected 'public' (T_PUBLIC) So where do I put this CI email functionality?
proof that an old dog can learn new tricks
|
Messages In This Thread |
localhost setup for using MailServer - by richb201 - 06-27-2018, 02:09 AM
RE: localhost setup for using MailServer - by InsiteFX - 06-27-2018, 03:13 AM
RE: localhost setup for using MailServer - by richb201 - 06-27-2018, 12:57 PM
RE: localhost setup for using MailServer - by kilishan - 06-27-2018, 01:15 PM
RE: localhost setup for using MailServer - by richb201 - 06-27-2018, 02:05 PM
RE: localhost setup for using MailServer - by InsiteFX - 06-27-2018, 02:31 PM
RE: localhost setup for using MailServer - by richb201 - 06-27-2018, 03:07 PM
RE: localhost setup for using MailServer - by InsiteFX - 06-28-2018, 04:10 AM
RE: localhost setup for using MailServer - by richb201 - 06-28-2018, 06:38 AM
RE: localhost setup for using MailServer - by InsiteFX - 06-28-2018, 07:40 AM
|