Use 2 email configuration |
11-06-2017, 11:38 AM
(This post was last modified: 11-06-2017, 11:39 AM by ivantcholakov. Edit Reason: fixing a directory name )
I got interested on how I would do this and here is something I've just tested.
1. Create within the config/ folder two configuration files, email.php and email_2.php and fill them with the corresponding data for the two email accounts. 2. Within libraries/ directory create a file Email_2.php with the following content: Code: <?php defined('BASEPATH') OR exit('No direct script access allowed'); 3. Within the controller Welcome.php or other controller test with this fragment of code: Code: $this->load->library('email'); You would see that both library instances have different properties, according to their configuration files. |
Messages In This Thread |
Use 2 email configuration - by serialkiller - 10-31-2017, 01:18 AM
RE: Use 2 email configuration - by dave friend - 10-31-2017, 08:47 AM
RE: Use 2 email configuration - by serialkiller - 11-06-2017, 08:14 AM
RE: Use 2 email configuration - by ivantcholakov - 11-06-2017, 11:38 AM
RE: Use 2 email configuration - by serialkiller - 11-07-2017, 08:22 AM
|