problema con phpmailer 5.2.1

Giuliotresauri

Nuovo Utente
9 Nov 2008
21
0
0
il codice (breve) e' questo (ho omesso certi riferimenti dei miei account di libero):

(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:

borgo italia

Super Moderatore
Membro dello Staff
SUPER MOD
MOD
4 Feb 2008
16.046
150
63
PR
www.borgo-italia.it
ciao
verifica che nella cartella PHPMailer_5.2.1 ci sia il file class.smtp.php, serve alla classe phpmailer per inviare via smtp, se non c'è cercalo dove hai scaricato la classe e aggiungilo
 
Discussioni simili
Autore Titolo Forum Risposte Data
L invio smtp con phpmailer - problema invia due volte la email allo stesso utente PHP 0
L problema classe phpmailer con la mia classe clsMail PHP 2
A problema con phpmailer PHP 10
catellostefano Problema con la classe class.phpmailer.php PHP 5
O problema con dvr dahua xvr5116 IP Cam e Videosorveglianza 0
G Problema con Xampp Web Server 1
andrea barletta Problema con miniature comandi Photoshop 0
I problema con alice Posta Elettronica 0
N Problema con position absolute e overflow HTML e CSS 4
L Problema con inner join PHP 11
K [php] Problema con inner join PHP 4
K [PHP] Problema con variabili concatenate. PHP 1
O problema con query PHP 4
I problema con 2 account Posta Elettronica 1
L problema collegamento file css con html HTML e CSS 1
E Problema accesso a file con app sviluppata con MIT APP INVENTOR 2 Sviluppo app per Android 0
M Problema con Try Catch PHP 0
Sergio Unia Problema con gli eventi del mouse su una data table: Javascript 2
T PROBLEMA CON SESSIONI PHP 3
T ALTRO PROBLEMA CON ARRAY PHP PHP 1
R problema con else PHP 0
T PROBLEMA CON ARRAY PHP 8
L problema con query select PHP 2
R Problema query con ricerca id numerico PHP 2
F Problema con risposta PHP 0
S problema con recupero dati tabella mysql PHP 2
Z Problema con il mio tp-l i nk Reti LAN e Wireless 1
L Problema RAM con Tomcat 8 Apache 0
napuleone problema con sort e asort PHP 4
Z Problema con INT MySQL PHP 1
Z Problema database MySQL con XAMPP PHP 0
M Problema con controllo form in real time jQuery 6
Z Problema di sincronizzazione PAYPAL con PHP PHP 1
G Problema con Get page PHP 4
P Problema con require once PHP 6
P Problema con i package Java 1
A Problema login con Safari PHP 14
F INDESIGN: problema esportazione esecutivo per la stampa con foto B/N Webdesign e Grafica 0
S problema con css bootstrap3 HTML e CSS 4
M .load() problema con caricamenti dinamici di js Javascript 0
G Problema con eccessiva nitidezza apertura Camera Raw Photoshop 0
G Problema ------- con Query PHP 1
G Problema con Query PHP 1
T problema con select dinamica con jquery Javascript 0
S Problema con spazi bianchi HTML e CSS 5
A PROBLEMA: insert mysqli con dati Tagsinput Presentati al Forum 0
Tommy03 Problema con z-index HTML e CSS 3
M Problema inserimento parole con apostrofo nel db PHP 5
C Problema con dati meteo xml XML 1
S Problema con infrarossi videocamera IP Cam e Videosorveglianza 1

Discussioni simili