0

I'm trying to send an email using this code:

$this->load->library('email');

$this->email->from("myemail@email.com");
$this->email->reply_to("myemail@email.com");
$this->email->to("myemail@email.com");
$this->email->subject("Test mail");
$this->email->message("Email body");
$this->email->set_alt_message("Email body txt");
$this->email->send();

I just hosted my site in InfinityFree and when I tried sending emails, It's not sending anymore. Can please someone help. My code was working before a hosted it in InfinityFree

geek_10101010
  • 90
  • 1
  • 4
  • 19
  • Have you set the email config settings correct https://www.codeigniter.com/user_guide/libraries/email.html#setting-email-preferences-in-a-config-file –  Nov 26 '17 at 03:09
  • $config['protocol'] = 'smtp'; $config['smtp_host'] = 'ssl://smtp.googlemail.com'; $config['smtp_port'] = 465; $config['smtp_user'] = 'email'; $config['smtp_pass'] = 'password'; $config['mailtype'] = 'html'; $config['charset'] = 'iso-8859-1'; $config['wordwrap'] = TRUE; $config['newline'] = "\r\n"; $this->email->initialize($config); ***I have this config, I'm not sure if it's correct with InfinityFree**** – geek_10101010 Nov 26 '17 at 03:14
  • Put the code in your question not comment –  Nov 26 '17 at 03:56

0 Answers0