Can't send mail in "Forget password" function when logging

#1
[eluser]haily_php[/eluser]
i have 1 problem when I have executed "Forget password" function in Logging.
Code:
Message: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()

I have configured Email.php in system/libraries

Code:
var    $useragent        = "CodeIgniter";
    var    $mailpath        = "/usr/sbin/sendmail";    // Sendmail path
    var    $protocol        = "mail";    // mail/sendmail/smtp
    var    $smtp_host        = "mail.chuahaiquang.com.vn";        // SMTP Server.  Example: mail.earthlink.net
    var    $smtp_user        = "testmail@chuahaiquang.com.vn";        // SMTP Username
    var    $smtp_pass        = "********";        // SMTP Password
    var    $smtp_port        = "25";        // SMTP Port

But it has not run? Please help me

#2
[eluser]approacher[/eluser]
I guess you might have edited the system/libraries/Email.php
if so nothing to do with that.

first be ensure that if chuahaiquang.com.vn actually providing smtp service

why to wonder. create your gmail account if you dont have and enable the smtp service after going to setting.
then it works .gmail provides free smtp service

then inside config folder create file something like Email.php and copy paste the below code

Code:
$config['protocol']     = 'smtp';
    //$config['mailpath']     = '/usr/sbin/sendmail';
      $config['charset']      = 'iso-8859-1';
    //$config['wordwrap']     = TRUE;
    //$config['mailtype']     = 'html';
      $config['smtp_host']    = 'smtp.gmail.com';
      $config['smtp_user']    = 'gmail id@gmail.com';
      $config['smtp_pass']    = 'gmail password';
      $config['smtp_port']    = 25;
      $config['smtp_timeout'] = 30;
      $config['charset']      ='utf-8';  
      $config['newline']      ="\r\n";

Then edit php.ini ====>SMTP= smtp.gmail.com

#3
[eluser]haily_php[/eluser]
Thanks for helping but it has appeared other error:
Code:
530 5.7.0 Must issue a STARTTLS command first
I have done may ways which in internet but it has not working. Please help me again.

#4
[eluser]approacher[/eluser]
Did you enable smtp service in gmail account??

go to setting -->Forwarding and POP/IMAP -->Enable POP for all mail (even mail that's already been downloaded)
OR Enable POP only for mail that arrives from now on

and save changes


http://www.google.com/support/forum/p/Google Apps/thread?tid=396e53acd0030ef4&hl=en

#5
[eluser]haily_php[/eluser]
Thanks for helping but my problem has solved, it has not worked because my stupid fault: Not open mode ssl extension in php.ini


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.