• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding Specific Configuration in CodeIgniter Email Class

#1
Question 
I'm trying to send an email in my localhost and i use codeigniter's email class function but i always encountered SSL Handshake error,so now i try PHP mailer , so now i cannot still sent email from my local computer , then i found out that in PHPmailer settings, i should add this configuration :

PHP Code:
$mail->SMTPOptions  array(
 
  'ssl' => array(
 
    'verify_peer' => false,
 
    'verify_peer_name' => false,
 
    'allow_self_signed' => true
    
)
 ); 

Now i can send email from my computer, but i would prefer to use codeigniter's email library because i dont want additional class or scripts to download

So my question , how do i add that configuration to codeigniter's email class ?

PHP Code:
array(
 
  'ssl' => array(
 
    'verify_peer' => false,
 
    'verify_peer_name' => false,
 
    'allow_self_signed' => true
    
)
 ); 
Neko CMS - A free Simple CMS! developed using CodeIgniter
Novi
Software Developer / Web Developer
Reply

#2
I don't remember whether the original CodeIgniter's email library can do this, but it can be upgraded to use PHPMailer. You may try this project of mine https://github.com/ivantcholakov/codeigniter-phpmailer , the README contains instructions about the installation.

Your application code about emails would not need modifications, leave it as it is.

Then, see the answer of this question: https://github.com/ivantcholakov/codeign.../issues/14
A new configuration option has been added that is interesting for you, $config['smtp_conn_options'] .
Reply

#3
On localhost you need to setup the SMTP etc; in your php.ini file.

I setup my localhost to use my comcast smtp server and it works fine.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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