php - Error while sending an Email using codeigniter -


i trying send email using codeigniter function. have try code.

<?php if ( ! defined('basepath')) exit('no direct script access allowed');   public function __construct() {      parent::__construct();   }  function index() {     $this->load->library('email');      $this->email->from('praju.rade@gmail.com', 'your name');     $this->email->to('praju.rade@gmail.com');     $this->email->subject('email test');     $this->email->message('testing email class.');      $this->email->send();     //$this->load->view('welcome_message'); } 

} ?>


i got error.

a php error encountered

severity: warning

message: mail(): failed connect mailserver @ "smtp.wlink.com.np" port 25, verify "smtp" , "smtp_port" setting in php.ini or use ini_set()

filename: libraries/email.php

line number: 1553

the error message helps little know happens. can contact supplier provide information on smtp server or set preferences mail codeigniter not use smtp use native php mail function https://codeigniter.com/user_guide/libraries/email.html#email-preferences

you use gmail smtp http://www.formget.com/codeigniter-gmail-smtp/


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

node.js - Express and Redis - If session exists for this user, don't allow access -

excel - I can't get the attachement of the email PHP -