[eluser]Imran Tariq[/eluser]
I have the same issue in my Application while using Email Library. I have the script the following script which is working fine on my local server (Win OS), but when I upload it, the script gave me the error. See below.
The Controller Code
Code:
<?php
class Email extends Controller
{
function Email()
{
parent::Controller();
$this->load->library('email');
}
function index()
{
$this->load->model('EmailTesting');
$this->EmailTesting->emailTest();
}
}?>
The (EmailTesting) Model Code
Code:
<?php
class EmailTesting extends Model
{
function EmailTesting()
{
parent::Model();
$this->load->helper('email');
error_reporting(0);
}
function emailTest()
{
$config = array('protocol' => 'smtp',
'smtp_host' => 'smtpout.secureserver.net',
'smtp_port' => 25,
'smtp_user' => '[email protected]',
'smtp_pass' => 'password',
'mailtype' => 'html',
'charset' => 'iso-8859-1'
);
$this->load->library('email', $config);
$this->email->initialize($config);
$Email = '[email protected]';
$Subject = 'Email Subject';
$Message = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head><title></title></head><body><table border="0" cellpadding="5" cellspacing="0"><tr>
<td nowrap="nowrap" align="right" style="font-weight:bold">Name :</td><td>Test Last, Test First</td>
</tr></table></body></html>';
$this->email->set_newline("\r\n");
$this->email->from('[email protected]', 'Testing Email');
$this->email->to($Email);
$this->email->subject($Subject);
$this->email->message($Message);
$result = $this->email->send();
echo $this->email->print_debugger();
return $result;
}
}?>
The Error I am getting after uploading
Quote:The following SMTP error was encountered: 110 Connection timed out
Unable to send data: AUTH LOGIN
Failed to send AUTH LOGIN command. Error:
Unable to send data: MAIL FROM:
from:
The following SMTP error was encountered:
Unable to send data: RCPT TO:
to:
The following SMTP error was encountered:
Unable to send data: DATA
data:
The following SMTP error was encountered:
Unable to send data: User-Agent: CodeIgniter Date: Thu, 1 Apr 2010 05:41:20 -0700 From: "Testing Email" Return-Path: To: [email protected] Subject: =?iso-8859-1?Q?Email_Subject?= =?iso-8859-1?Q?0?= Reply-To: "[email protected]" X-Sender: [email protected] X-Mailer: CodeIgniter X-Priority: 3 (Normal) Message-ID: <[email protected]> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="B_ALT_4bb49470ec029" This is a multi-part message in MIME format. Your email application may not support this format. --B_ALT_4bb49470ec029 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Name :Test Last, Test First --B_ALT_4bb49470ec029 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Name= : Test Last, Test First
--B_ALT_4bb49470ec029--
Unable to send data: .
The following SMTP error was encountered:
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
User-Agent: CodeIgniter
Date: Thu, 1 Apr 2010 05:41:20 -0700
From: "Testing Email"
Return-Path:
To: [email protected]
Subject: =?iso-8859-1?Q?Email_Subject?=
=?iso-8859-1?Q?0?=
Reply-To: "[email protected]"
X-Sender: [email protected]
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="B_ALT_4bb49470ec029"
This is a multi-part message in MIME format.
Your email application may not support this format.
--B_ALT_4bb49470ec029
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Name :Test Last, Test First
--B_ALT_4bb49470ec029
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org=
/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head><title></title></head><body><table bor=
der=3D"0" cellpadding=3D"5" cellspacing=3D"0"><tr>
<td nowrap=3D"nowrap" align=3D"right" style=3D"font-weight:bold">Name=
:</td><td>Test Last, Test First</td>
</tr></table></body></html>
--B_ALT_4bb49470ec029--
Please ANYONE CAN HELP ME to resolve the issue.