Https://social45.000webhostapp.com/index.php/client/singup1


#1

https://social45.000webhostapp.com/index.php/client/singup1

i will use codeigniter email class to send email and it perfectly send by wamp server … but when i upload it in ooowebhost it not send email so place help me …


#2

Does it use mail() ?


#3

yes i will use codeigniter email class and function…


#4
		    <?php
		 
		if ( ! defined('BASEPATH')) exit('No direct script access allowed');

		class Client extends CI_Controller 
		{
			 public function __construct()
		       {
		            parent::__construct();
		        }
		        public function index()
		        {
			    $this->load->view("loging"); 
			    //$this->load->view("codeverifive"); 
		        }


		public function menu($var)
		{
		if($var=="create")
		{
		    $this->load->view("singup");   
		}
		else
		{
			    $this->load->view("loging");   
		}
		}

				public function singup1()
				{
		$this->form_validation->set_error_delimiters('<p class="text-danger text-capitalize">',' <i class="fa fa-exclamation-triangle"></i> </p>');
				    if($this->form_validation->run('sinup')==true)
				    {

		$uid=$this->input->post("email");
		$cod=rand();
		$this->load->library('email');
		$config['protocol']    = 'smtp';
		$config['smtp_host']    = 'ssl://smtp.gmail.com';
		$config['smtp_port']    = '465';
		$config['smtp_timeout'] = '10';
		$config['smtp_user']    = 'abc@gmail.com';
		$config['smtp_pass']    = 'password';
		$config['charset']    = 'utf-8';
		$config['newline']    = "\r\n";
		$config['mailtype'] = 'text'; // or html
		$config['validation'] = TRUE; // bool whether to validate email or not      
		$this->email->initialize($config);
		$this->email->from('rjjadav45@gmail.com', 'R.j.Jadav');
		$this->email->to($uid); 


		$this->email->subject('OTP For Email Varification...');

		$this->email->message('We got a request to create a new Account with your Email Id '.$uid." for the Email verification code is : ".$cod);  

		$this->email->send();

		if ($this->email->send())
		 {

		$cookie = array(
		    'name'   => 'code',
		    'value'  => $cod,
		    'expire' => '100'
		);
		$this->input->set_cookie($cookie);
		$this->load->view("codeverifive"); 
		}
		 else 
		{
		 $this->load->view("singup",array('er1' => "Your Email Id Is Inccorect !" ));
		}
				    }
				    else
				    {
		 $this->load->view("singup");
				    }

				}


		}

		?>


		it code perfectly working with wamp server...

#5

@Infinity @teodor @akhilkumar332


#6

@jadav Can you downgrade your php version to “5.6” from “Setting” >> “General” in your account and then try again.
Make sure you use correct smtp details.

It should not be "ssl://", It should be "https://smtp.gmail.com" (Hope you’re aware of this).