I have the following to send an email
if($this->form_validation->run())
{
$data = $this->input->post();
$this->load->library('email');
$this->email->from('me@gmail.com', 'Joe Dev');
$this->email->reply_to('me@gmail.com', 'Joe Dev');
$this->email->to('someone@mail.com');
$this->email->cc('friend@mail.com');
$this->email->subject('Email Test');
$this->email->message('I used this firstname: '. $data['fname']);
$this->email->send();
$config['charset'] = 'iso-8859-1';
$config['smtp_host'] = 'mail.google.com';
$config['smtp_user'] = 'me@gmail.com';
$config['smtp_pass'] = 'mypassword';
$this->email->initialize($config);
}
where $this->email->to() is my webmail account, it delivers the message successfully but it has failed for every gmail account I tried sending it to. What may be the problem?