Welcome Guest, Not a member yet? Register   Sign In
Best way of setting a global email recipient
#3

[eluser]prezet[/eluser]
Sorry.

Well, I've got a few controllers that make use of the Email class, and I construct the rules like so:

Code:
// Set email rules
$this->email->from('[email protected]', 'someone');
$this->email->to('[email protected]');
$this->email->subject('Hello');
$this->email->message('How are you?');

So rather than me having to set the:

Code:
$this->email->to('[email protected]');

.. in each controller, I'd like to have it globally defined somewhere, ideally in the Email config file, so that ALL email's sent from the Email class will go to that recipient. Otherwise, if the recipients email changes, I've then got to go through each of the controllers and change it, rather than just making the change in a centralised file.

Thanks.


Messages In This Thread
Best way of setting a global email recipient - by El Forum - 08-30-2008, 06:41 AM
Best way of setting a global email recipient - by El Forum - 08-30-2008, 07:10 AM
Best way of setting a global email recipient - by El Forum - 08-30-2008, 07:18 AM
Best way of setting a global email recipient - by El Forum - 08-30-2008, 08:23 AM
Best way of setting a global email recipient - by El Forum - 08-30-2008, 08:31 AM
Best way of setting a global email recipient - by El Forum - 08-30-2008, 09:35 AM
Best way of setting a global email recipient - by El Forum - 08-30-2008, 09:40 AM
Best way of setting a global email recipient - by El Forum - 08-30-2008, 03:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB