Jump to content

sending email with codeigniter


Recommended Posts

hey there - I am setting up a system that when a new account is created, the new user is sent an email with a confirmation email that has hashed token link to it for security. I'm getting confirmation that emails are being sent via


however, I've only been able to receive one email. I'm wondering if all of my configurations for my server ( as I'm developing locally) are set up properly, as well as my code flow being correct.




		if($query = $this->user_model->create_member())
			$data['main_content'] = 'account/welcome';
			$this->load->view('includes/templates/main_page_template', $data);


function varification_email()

		$query = $this->db->query('SELECT * FROM users order by id desc LIMIT 1');

		foreach ($query->result() as $user)


			$this->email->from('noreply@blah.com', 'blahblahblah');
			echo $user->email; 

			$this->email->subject('Email Test');
			$this->email->message('Testing the email class.');	


			echo $this->email->print_debugger();





Also, I'm assuming it's okay to do this ONLY on my controller with no involvement with a model?



Thanks in advance.


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.