Welcome Guest, Not a member yet? Register   Sign In
does codeigniter recognize system proxy settings?
#1

I want to send mail through codeIgniter application.
When i try it on a computer without system proxy settings, it works fine.
But my web server uses system proxy settings and email sending give this error:
Code:
A PHP Error was encountered

Severity: Warning

Message: fsockopen():

Filename: libraries/Email.php
here is my controller code
PHP Code:
public function mailMotDePasse($recepteur,$motDePasse)
 {
 
$config = Array(
 
'protocol' => 'smtp',
 
'smtp_host' => 'ssl://smtp.googlemail.com',
 
'smtp_port' => 465,
 
'smtp_user' => '[email protected]'// change it to yours
 
'smtp_pass' => 'xxxxxxxxxxxxxxx'// change it to yours
 
'mailtype' => 'html',
 
'charset' => 'iso-8859-1',
 
'wordwrap' => TRUE
 
);
 
 
//$message = '<font color= "red"><hr/>Veuillez accusé réception!!</font>';
 
$this->load->library('email'$config);
 
// $this->email->initialize();
 
$this->email->set_newline("\r\n");
 
$this->email->from('xxxxxxxxxxx xxxxxxxxx '); // change it to yours
 
$this->email->to($recepteur);// change it to yours
 
$this->email->subject(' my subject');
 
$message"my message"
 
$this->email->message($message);
 if(
$this->email->send())
 {
 return 
TRUE;
 }
 else
 {
 return 
FALSE;
 }
 } 

I'm wondering if codeigniter recognize the system proxy parametters or how to make codeIgniter use those parametrers.
Please help. I'm passing other the deadline.
Reply
#2

CI doesn't care for proxy settings, but PHP may ... if PHP recognizes them, so will CI.
Reply
#3

(09-23-2015, 04:54 AM)Narf Wrote: CI doesn't care for proxy settings, but PHP may ... if PHP recognizes them, so will CI.

thanks for replying. What can I do now?
The error code is not explicit.

Code:
A PHP Error was encountered

Severity: Warning

Message: fsockopen():

Filename: libraries/Email.php

Line Number: 1949

Backtrace:

File: C:\wamp\www\CardsManagerApp\application\models\fonction.php
Line: 60
Function: send

File: C:\wamp\www\CardsManagerApp\application\controllers\livraison.php
Line: 1747
Function: envoyerMail

File: C:\wamp\www\CardsManagerApp\index.php
Line: 292
Function: require_once
Reply
#4

(09-23-2015, 06:41 AM)Hyper-X Wrote:
(09-23-2015, 04:54 AM)Narf Wrote: CI doesn't care for proxy settings, but PHP may ... if PHP recognizes them, so will CI.

thanks for replying. What can I do now?
The error code is not explicit.



Code:
A PHP Error was encountered

Severity: Warning

Message: fsockopen():

Filename: libraries/Email.php

Line Number: 1949

Backtrace:

File: C:\wamp\www\CardsManagerApp\application\models\fonction.php
Line: 60
Function: send

File: C:\wamp\www\CardsManagerApp\application\controllers\livraison.php
Line: 1747
Function: envoyerMail

File: C:\wamp\www\CardsManagerApp\index.php
Line: 292
Function: require_once

The problem is the proxy. PHP docs on fsockopen has the answer:
http://php.net/manual/en/function.fsockopen.php#82586

Remember that not all problems are CodeIgniter related. Reading up on PHP Docs can help
Reply
#5

(09-23-2015, 07:16 AM)Martin7483 Wrote:
(09-23-2015, 06:41 AM)Hyper-X Wrote:
(09-23-2015, 04:54 AM)Narf Wrote: CI doesn't care for proxy settings, but PHP may ... if PHP recognizes them, so will CI.

thanks for replying. What can I do now?
The error code is not explicit.





Code:
A PHP Error was encountered

Severity: Warning

Message: fsockopen():

Filename: libraries/Email.php

Line Number: 1949

Backtrace:

File: C:\wamp\www\CardsManagerApp\application\models\fonction.php
Line: 60
Function: send

File: C:\wamp\www\CardsManagerApp\application\controllers\livraison.php
Line: 1747
Function: envoyerMail

File: C:\wamp\www\CardsManagerApp\index.php
Line: 292
Function: require_once

The problem is the proxy. PHP docs on fsockopen has the answer:
http://php.net/manual/en/function.fsockopen.php#82586

Remember that not all problems are CodeIgniter related. Reading up on PHP Docs can help

ok thanks. I'll check on PHP docs and i'll be back.
Reply
#6

I'm getting no issue with this problem. Please help.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB