Welcome Guest, Not a member yet? Register   Sign In
Facing issue sending email and input of user

i make simple form user submit email and city submit the form and send email to user of thanks i host website on godaddy, when i submit it shows errors.
1- Sending email error
2- $email input not get
for suggestion i share code.

user.php controller
public function sendUserMail($email) {
   $email = $this->input->get("email");  
   $this->email->from('[email protected]', 'Halalat');
   $this->email->subject('Halalat Newsletter Subscription');
   echo $this->email->print_debugger();

In config i made email.php

$config['protocol'] = 'smtp';
$config['smtp_host'] = 'host.abc.com';
$config['smtp_port'] = '465';
$config['smtp_user'] = '[email protected]';
$config['smtp_pass'] = 'abc';
$config['charset'] = 'utf-8';
$config['mailtype'] = 'html';
$config['newline'] = "\r\n";


user_model.php in model

function create_member()
   $new_member_insert_data = array(
    'email' => $this->input->post('email'),
    'city' => $this->input->post('city'),      
   $insert = $this->db->insert('users', $new_member_insert_data);
  return $insert;

} //create_member

It would help if you listed the Email Errors that you are getting.

For one thing, this line:

You have $email in single quotes, which makes it a literal "$email" string instead of the contents of the variable. Remove the quotes.

$email = '[email protected]';
echo '$email';
//outputs: $email, not [email protected]

Theme © iAndrew 2016 - Forum software by © MyBB