made a simple submission user form email & city data saved in database, now I need to add in this form after submission of data system generate auto email on user addres
Make email sending section as a function in your controller:
public function sendUserMail($email)
{
$this->load->library('email');
$this->email->from('noreply@abc.com', 'Halalat');
$this->email->to('$email');
$this->email->subject('Halalat Newsletter Subscription');
$this->email->message('Testing');
$this->email->attach('/assests/images/photo1.jpg');
$this->email->send();
echo $this->email->print_debugger();
}
In your action section, add email function call after
if ($query = $this->Users_model->create_member()) {
like:
$this->sendUserMail($this->input->post("email"));