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('no-reply@mymail.com '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) Quote Link to comment 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 = "mymail@gmail.com"; $this->email->to($em, $second_email); Quote Link to comment 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 = "mymail@gmail.com"; $this->email->to($em, $second_email); email is sent to only $em and if i use $second_email = "mymail@gmail.com"; $this->email->to($second_email, $em); email is sent to only $second_email any more suggestions? Quote Link to comment Share on other sites More sharing options...
New Coder Posted November 24, 2010 Share Posted November 24, 2010 You could try $second_email = "mymail@gmail.com"; $send_to = $em. ", ". $second_email; $this->email->to($send_to); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.