il codice (breve) e' questo (ho omesso certi riferimenti dei miei account di libero):
(versione php 5.4)
quando eseguo lo script,il debug mi da' come ultimi messaggi:
SMTP -> get_lines(): $str is "235 LOGIN authentication successful "
SMTP -> get_lines(): $data is "235 LOGIN authentication successful "
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "250 MAIL FROM: OK "
SMTP -> get_lines(): $data is "250 MAIL FROM: OK "
SMTP -> FROM SERVER:250 MAIL FROM: OK
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "250 RCPT TO: OK "
SMTP -> get_lines(): $data is "250 RCPT TO: OK "
SMTP -> FROM SERVER:250 RCPT TO: OK
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "354 Start mail input; end with . "
SMTP -> get_lines(): $data is "354 Start mail input; end with . "
SMTP -> FROM SERVER:354 Start mail input; end with .
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "550 Per ulteriori informazioni, vai a: http://aiuto.libero.it/invioposta "
SMTP -> get_lines(): $data is "550 Per ulteriori informazioni, vai a: http://aiuto.libero.it/invioposta "
SMTP -> FROM SERVER:550 Per ulteriori informazioni, vai a: http://aiuto.libero.it/invioposta
SMTP -> ERROR: DATA not accepted from server: 550 Per ulteriori informazioni, vai a: http://aiuto.libero.it/invioposta
SMTP Error: Data not accepted. Mailer Error: SMTP Error: Data not accepted.
Che cosa potrebbe essere? Nella variabile $msg ho provato a impostare anche la funzione utf8_decode ottenendo lo stesso errore 550.
(versione php 5.4)
PHP:
<?php
include('PHPMailer_5.2.1/class.phpmailer.php');
// Here sets data for email
$from = '[email protected]';
$from_name = 'Your name';
$to = '[email protected]';
$toname = 'Receiver Name';
$subject = 'Subject for email';
$msg = 'The email message, can contains HTML tags';
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "smtp.libero.it"; // SMTP server
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure = "ssl"; // sets the prefix to the servier
$mail->SMTPDebug = 10; // debug sending email
$mail->Host = "smtp.libero.it"; // sets the SMTP server
$mail->Port = 465; // set the SMTP port for the MAIL server
$mail->Username = '[email protected]'; // your email account
$mail->Password = 'miapassword'; // email password
$mail->SetFrom($from, $from_name);
$mail->AddReplyTo($from, $from_name);
$mail->Subject = $subject;
$mail->MsgHTML($msg); // to send with HTML tags
$mail->AddAddress($to, $toname);
if(!$mail->Send()) {
echo 'Mailer Error: '. $mail->ErrorInfo;
} else {
echo 'Message sent!';
}
?>
quando eseguo lo script,il debug mi da' come ultimi messaggi:
SMTP -> get_lines(): $str is "235 LOGIN authentication successful "
SMTP -> get_lines(): $data is "235 LOGIN authentication successful "
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "250 MAIL FROM: OK "
SMTP -> get_lines(): $data is "250 MAIL FROM: OK "
SMTP -> FROM SERVER:250 MAIL FROM: OK
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "250 RCPT TO: OK "
SMTP -> get_lines(): $data is "250 RCPT TO: OK "
SMTP -> FROM SERVER:250 RCPT TO: OK
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "354 Start mail input; end with . "
SMTP -> get_lines(): $data is "354 Start mail input; end with . "
SMTP -> FROM SERVER:354 Start mail input; end with .
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "550 Per ulteriori informazioni, vai a: http://aiuto.libero.it/invioposta "
SMTP -> get_lines(): $data is "550 Per ulteriori informazioni, vai a: http://aiuto.libero.it/invioposta "
SMTP -> FROM SERVER:550 Per ulteriori informazioni, vai a: http://aiuto.libero.it/invioposta
SMTP -> ERROR: DATA not accepted from server: 550 Per ulteriori informazioni, vai a: http://aiuto.libero.it/invioposta
SMTP Error: Data not accepted. Mailer Error: SMTP Error: Data not accepted.
Che cosa potrebbe essere? Nella variabile $msg ho provato a impostare anche la funzione utf8_decode ottenendo lo stesso errore 550.
Ultima modifica di un moderatore: