Salutare
Am incercat sa trimit de pe localhost un mail folosind serverul de smtp de la gmail impreuna cu clasa phpmailer dar imi da eroare.
Daca incerc pe linux merge dar pe w7 nu...
Cand rulez scriputul apare fundalul alb fara nicio eroare
Astept sugestii ms.
phpmailer
Moderatori: Moderatori, Start Moderator
-
nevvermind
- Senior Member
- Mesaje: 1264
- Membru din: Mar Iun 22, 2010 3:17 pm
-
nevvermind
- Senior Member
- Mesaje: 1264
- Membru din: Mar Iun 22, 2010 3:17 pm
nevvermind scrie:ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
la fel... verificati scriptul poate e ceva ce e greist...
Cod: Selectaţi tot
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->SMTPDebug = 1; // enables SMTP debug information (for testing)
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPKeepAlive = false; // SMTP connection will not close after each email sent
$mail->Host = "smtp.gmail.com"; // sets the SMTP server
$mail->Port = 465; // set the SMTP port for the GMAIL server
$mail->Username = "id@gmail.com"; // SMTP account username
$mail->Password = "parola"; // SMTP account password
$mail->SetFrom("id@gmail.com", "test mail");
$mail->Subject = "PHPMailer Test Subject via smtp";
$body = "Mesaj de test trimis cu smtp gmail";
$mail->MsgHTML($body);
$mail->AddAddress("s1gm0@yahoo.com", "Adelin");
if( ! $mail->Send() )
echo "Mailer Error: " . $mail->ErrorInfo;
else
echo "Message sent!";
-
nevvermind
- Senior Member
- Mesaje: 1264
- Membru din: Mar Iun 22, 2010 3:17 pm
MihaiA scrie:incearca portul 487/587, parca 465 este blocat de catre rds(asta in cazul in care ai rds).
da am rds...
cu portul 487 imi da eroarea:
Cod: Selectaţi tot
SMTP -> ERROR: Failed to connect to server: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (10060)
SMTP Error: Could not connect to SMTP host. Mailer Error: SMTP Error: Could not connect to SMTP host.
cu portul 587 imi da eroarea:
Cod: Selectaţi tot
Warning: stream_socket_enable_crypto() [streams.crypto]: this stream does not support SSL/crypto in ...\php5\class.smtp.php on line 197
am lasat portul 587 si nu am mai pus $mail->SMTPSecure = "tls";
si imi da eroarea:
Cod: Selectaţi tot
SMTP -> ERROR: AUTH not accepted from server: 530 5.7.0 Must issue a STARTTLS command first. x1sm1861887fah.2
SMTP Error: Could not authenticate. Mailer Error: SMTP Error: Could not authenticate.
userul si parola sunt buna le-am verificat de 2 ori
alte pareri?
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Google [Bot] și 44 vizitatori