[eluser]Unknown[/eluser]
Could this library send email behind the proxy?
I try to code like this:
class Email extends Controller {
function Email(){
parent::Controller();
$this->load->library('email');
$this->load->library('proxy');
}
function index()
{
$this->proxy->set_proxy('proxies.*****.co.id',8080,'***@***.co.id','password');
$hasil=$this->proxy->controller('email/send_email', TRUE);
echo $hasil;
}
function send_email()
{
$this->email->set_newline("\r\n");
$this->email->from('*****@gmail.com');
$this->email->to("*****@gmail.com");
$this->email->subject('A test email from CodeIgniter using Gmail');
$this->email->message("I can now email from CodeIgniter using Gmail as my server!");
if($this->email->send()) {
return "Message sent successfully!";
}
else {
return "Fail to send your message!!";
}
}
}
But nothing happen, if i run this code outside the proxy, the code function send_mail run smoothly.
Any suggest how to send email behind the proxy?