[eluser]Unknown[/eluser]
Hi, guys, i'm trying to send e-mails from my CI application and i always get this error:
Code:
hello: Method EHLO is not supported.
The following SMTP error was encountered: Method EHLO is not supported.
Failed to send AUTH LOGIN command. Error:
from:
The following SMTP error was encountered:
to:
The following SMTP error was encountered:
data:
The following SMTP error was encountered:
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: Tue, 6 Jul 2010 12:13:24 +0200
From: "Opencampus"
Return-Path:
To: [email protected]
Subject: =?iso-8859-1?Q?Attivazione_open_campus?=
Reply-To: "[email protected]"
X-Sender: [email protected]
X-Mailer: Open Campus
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Here's the code i use to send e-mails, it can be found in a library called "lib_login" (the reason you can see the use of the $CI variable):
Code:
function send_activation_mail($user, $password){
$CI = & get_instance();
$config['protocol'] = 'smtp';
$config['useragent'] = 'Open Campus';
$config['smtp_host'] = 'smtp.libero.it';
$config['smtp_user'] = '[email protected]';
$config['smtp_pass'] = 'opencampus1';
$config['smtp_port'] = 25;
$config['charset'] = 'iso-8859-1';
$CI->load->library('email', $config);
$CI->email->set_newline("\r\n");
$CI->email->from('[email protected]', 'Opencampus');
$CI->email->to($user->get_email());
$CI->email->subject('Attivazione open campus');
$msg = 'Welcome in opencampus' . $user->get_nome() . $user->get_cognome().'.
Here is your login. Username: '. $user->get_username() . '. Password: '. $password;
if(!$CI->email->send()){
echo "Error!<br>";
show_error($CI->email->print_debugger());
}else echo "Mail sent!";
}
Is there a way to use the "HELO" method instead of EHLO? I guess the error is caused by that damned EHLO command.