vikas Posted November 23, 2010 Share Posted November 23, 2010 I want to send confirmation email to 2 different email boxes. this is the code sending to one box: { $this->load->library('email'); //$config['mailtype'] = 'html'; //$this->email->initialize($config); $this->email->from('[email protected] 'Site team'); $this->email->to($em); $this->email->subject('Welcome'); $msg = 'You have registered'; $this->email->message($msg); $this->email->send(); } thanks and what should be the code sending same email to one more email box (example: mymail@gmail. com) Link to comment https://forums.phpfreaks.com/topic/219576-php-confirmation-email-to-two-different-email-addresses/ Share on other sites More sharing options...
New Coder Posted November 23, 2010 Share Posted November 23, 2010 I dont use this type of email script but for mine I just seperate the addresses via a , so in your case i'd try: $second_email = "[email protected]"; $this->email->to($em, $second_email); Link to comment https://forums.phpfreaks.com/topic/219576-php-confirmation-email-to-two-different-email-addresses/#findComment-1138408 Share on other sites More sharing options...
vikas Posted November 23, 2010 Author Share Posted November 23, 2010 sorry, but this doesn't work if i use $second_email = "[email protected]"; $this->email->to($em, $second_email); email is sent to only $em and if i use $second_email = "[email protected]"; $this->email->to($second_email, $em); email is sent to only $second_email any more suggestions? Link to comment https://forums.phpfreaks.com/topic/219576-php-confirmation-email-to-two-different-email-addresses/#findComment-1138591 Share on other sites More sharing options...
New Coder Posted November 24, 2010 Share Posted November 24, 2010 You could try $second_email = "[email protected]"; $send_to = $em. ", ". $second_email; $this->email->to($send_to); Link to comment https://forums.phpfreaks.com/topic/219576-php-confirmation-email-to-two-different-email-addresses/#findComment-1138874 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.