• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Email configuration file does not exist

#1
After upgrading from version 2 to 3 i am getting this error "The configuration file email.php does not exist" Already Replace the ion auth files with the new files. Could you please help me out to figure out this problem. Thanks
Reply

#2
Sounds like there was an email.php setup under ./application/config/email.php
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#3
How can i fix it...?
Reply

#4
You would need to re-configure it if you do not have the original file.

That means going through the code to see what they where doing with the email.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#5
The configuration items for Email are well documented. Simply create the file /application/config/email.php and set preference as apply to your server.
Reply

#6
Hi,

I have the same problem, I don't know where I can find the email.php config file sample. I have no error message but no email sending to activate account or forget password. I suppose the problem come from this file ?

No email.php config file here :

https://github.com/bcit-ci/CodeIgniter/t...ion/config
https://github.com/benedmunds/CodeIgnite...e/3/config

Could you help me with this please ? Anyone can give me some exemple please ?
Reply

#7
(11-27-2019, 01:28 AM)nicolas33770 Wrote: Hi,

I have the same problem, I don't know where I can find the email.php config file sample. I have no error message but no email sending to activate account or forget password. I suppose the problem come from this file ?

No email.php config file here :

https://github.com/bcit-ci/CodeIgniter/t...ion/config
https://github.com/benedmunds/CodeIgnite...e/3/config

Could you help me with this please ? Anyone can give me some exemple please ?

You need to create the file yourself. Read This where a short example of setting configuration items is shown. All the possible settings are shown below that in the next section.
Reply

#8
Thanks Dave for your help. I have the mail problem only with ion_auth, it's very strange.

EDIT : It's ok, the config file was not updated on my server ! Sorry, thanks for your help! it's great, it works now.

I had indeed not read all the documentation on this part. My mistake. However I did not read this part because sending mail with CodeIgniter works without a configuration file because it uses my default php configuration it seems to me. Here is a test with CodeIgniter to prove it.

I also read this documentation (http://benedmunds.com/ion_auth/) but I can not find where the problem comes from. below my ion_auth.php configuration. Do you know why the mails of ion_auth do not work, it seems to me to have well configured everything nevertheless.

Test_mail with CodeIgniter - OK

PHP Code:
<?php
        
class Test_mail extends CI_Controller
        
{
                public function index()
                {
                    $this->load->library('email');

                    $this->email->from('contact@aaa.fr''gml');
                    $this->email->to('nicolas@bbb.fr');
                    
                    $this
->email->subject('Email Test');
                    $this->email->message('Testing the email class.');
                    
                    $this
->email->send();
                }
        }
?>


The mail.info log file OK : The email is correctly sent, I received it

Quote:Nov 27 14:52:06 dev postfix/cleanup[31587]: 8B171E1111: message-id=<5dde8d965fee4@aaa.fr>
Nov 27 14:52:06 dev postfix/qmgr[26164]: 8B171E1111: from=<contact@aaa.fr>, size=561, nrcpt=1 (queue active)
Nov 27 14:52:07 dev postfix/smtp[31589]: 8B171E1111: to=<nicolas@bbb.fr>, relay=aspmx.l.google.com[64.233.167.26]:25, delay=1.1, delays=0.29/0.01/0.26/0.52, dsn=2.0.0, status=sent (250 2.0.0 OK  1574866327 p2si11855207wro.124 - gsmtp)
Nov 27 14:52:07 dev postfix/qmgr[26164]: 8B171E1111: removed


If I try with ion_auth the interface informs me that the recovery email has been sent, but no mail is sent in the log or received in my mailbox

[Image: 69736187-4f9dcc80-1132-11ea-848e-44600d2a65f6.png]

I searched for "use_ci_email" and "email_config" in ion_auth but I did not find anything in your documentation, and it is not easy to know how configured this part, I do not know how to do, or what me problematic. Can you help me please ?

ma configuration ion_auth.php

PHP Code:
`$config['site_title']                = "bbb.fr";      
$config['admin_email']                = "contact@bbb.fr"; 
$config['default_group']              = 'members';          
$config['admin_group']                = 'admin';            
$config['identity']                  = 'email';            
$config['min_password_length']        = 8;                  
$config['email_activation']          = TRUE;              
$config['manual_activation']          = FALSE;              
$config['remember_users']            = TRUE;              
$config['user_expire']                = 86500;              
$config['user_extend_on_login']      = FALSE;              
$config['track_login_attempts']      = TRUE;                
$config['track_login_ip_address']    = TRUE;              
$config['maximum_login_attempts']    = 3;                  
$config['lockout_time']              = 600;                
$config['forgot_password_expiration'] = 1800;              
$config['recheck_timer']              = 0;                  

...

| -------------------------------------------------------------------------
| Email options.
| -------------------------------------------------------------------------
| email_config:
|   'file' = Use the default CI config or use from a config file
|   array  = Manually set your email config settings
*/
$config['use_ci_email'] = TRUE; //I also tried with FALSE  // Send Email using the builtin CI email class, if false it will return the code and the identity
$config['email_config'] = [
 'mailtype' => 'html',
]; 


I don't understand the "email_config" and the option information. I did not find the settings in your documentation and we do not know or put 'file', I may be silly sorry.

It's ok, the config file was not updated on my server ! Sorry, thanks for your help! it's great, it works now.
Reply

#9
Ion Auth has email settings inside it's own ./application/config/ion_auth.php

You need to set some email configuration in it.


As far as an email conf it is create by you in ./application/config/email.php

Here is a sample for you:

PHP Code:
<?php
defined
('BASEPATH') OR exit('No direct script access allowed');

/*
|---------------------------------------------------------------------
| CodeIgniter Email Configuration File.
|---------------------------------------------------------------------
|
| Location: ./application/config/email.php
|
| Please see the link below for Email Configuration values.
|
| https://codeigniter.com/user_guide/libraries/email.html#setting-email-preferences-in-a-config-file
*/

$config['useragent']        'CodeIgniter';
$config['protocol']         'mail';
$config['mailpath']         '/usr/sbin/sendmail';
$config['smtp_host']        '';
$config['smtp_user']        '';
$config['smtp_pass']        '';
$config['smtp_port']        25;
$config['smtp_timeout']     5;
$config['smtp_keepalive']   FALSE;
$config['smtp_crypto']      '';
$config['wordwrap']         TRUE;
$config['wrapchars']        76;
$config['mailtype']         'text';
$config['charset']          'utf-8';
$config['validate']         FALSE;
$config['priority']         3;
$config['crlf']             '\n';
$config['newline']          '\n';
$config['bcc_batch_mode']   FALSE;
$config['bcc_batch_size']   200;
$config['dsn']              FALSE;

/**
 * -----------------------------------------------------------------------
 * Filename: email.php
 * Location: ./application/config/email.php
 * -----------------------------------------------------------------------
 */ 
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#10
Thank you for you help :-)
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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