Welcome Guest, Not a member yet? Register   Sign In
email error
#6

[eluser]Unknown[/eluser]
Send mail from localhost to Gmail error help me. I'm using XAMPP server and MercuryMail. I've tested the Mercury mail and it works normally, but do not know why I still can not send mail from localhost Address to Gmail. Below is the image error, and my code
Error
Code:
An Error Was Encountered
The following SMTP error was encountered: 0 php_network_getaddresses: getaddrinfo failed: No such host is known.
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: Sat, 25 Dec 2010 17:04:12 +0700 From: "admin" Return-Path: To: [email protected] Subject: =?utf8?Q?Test_mail_?= Reply-To: "laptrinhvien.net@localhost" X-Sender: laptrinhvien.net@localhost X-Mailer: test X-Priority: 3 (Normal) Message-ID: <4d15c19bf3b88@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Working bravo
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: Sat, 25 Dec 2010 17:04:12 +0700
From: "admin"
Return-Path:
To: [email protected]
Subject: =?utf8?Q?Test_mail_?=
Reply-To: "laptrinhvien.net@localhost"
X-Sender: laptrinhvien.net@localhost
X-Mailer: test
X-Priority: 3 (Normal)
Message-ID: <4d15c19bf3b88@localhost>
Mime-Version: 1.0


Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

Working bravo

My code :
Code:
&lt;?php
/**Send mail by localhost
*
*/
class Email extends Controller
{
    function __construct()
    {
        parent::Controller();
    }
    function index()
    {
        $config = Array(
            'protocol'=>'smtp',
            'smtp_host'=>'ssl://smtp.googlemail.com',
            'smtp_post'=>465,
            'smtp_user'=>'[email protected]',
            'smtp_pass'=>'my_password_go_to_email',
            'mailtype'=>'text',
            'useragent'=>'test',
            'charset'=>'utf8',
            'wordwrap'=>TRUE        
        );
        $this->load->library('email',$config);
        $this->email->set_newline("\r\n");    
        $this->email->From('[email protected]','admin');
        $this->email->To('[email protected]');
        $this->email->Subject('Test mail ');
        $this->email->message('Working bravo');
        
        if($this->email->send())
        {
            echo 'Send Mail successful. ';
        }
        else {
            show_error($this->email->print_debugger());
            
        }
    }
}
?&gt;
I have XAMPP server config how to send mail from localhost. Please guide me, thanks


Messages In This Thread
email error - by El Forum - 12-06-2010, 06:56 AM
email error - by El Forum - 12-06-2010, 12:25 PM
email error - by El Forum - 12-06-2010, 11:31 PM
email error - by El Forum - 12-07-2010, 09:48 AM
email error - by El Forum - 12-07-2010, 01:36 PM
email error - by El Forum - 12-25-2010, 04:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB