yeahz Posted March 27, 2011 Report Share Posted March 27, 2011 (edited) Sūtu no localhosta šādu te lietu: ini_set("SMTP", "smtp.gmail.com"); ini_set("smtp_port", "465"); mail('someone@inbox.lv', 'sveiki', 'aaa ahahahahhahaha', 'From: someone2@gmail.com'); kādēļ negrib strādāt? rezultāts ir tāds, ka vienkārši lapa lādējas mūžīgi un nekas neaizsūtās. EDIT: pēc laba laika tomēr pārstāja lādēties un izmeta šito Warning: mail() [function.mail]: Failed to connect to mailserver at "smtp.gmail.com" port 465, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in *** on line 43 Fatal error: Maximum execution time of 30 seconds exceeded in *** on line 54 Vai tad gmails nepareizi nokonfigurēts? Edited March 27, 2011 by yeahz Quote Link to comment Share on other sites More sharing options...
EdgarsK Posted March 27, 2011 Report Share Posted March 27, 2011 cik zinu smtp arii vajag noradit username un paroli? :) + check the log file Quote Link to comment Share on other sites More sharing options...
Kemito Posted March 27, 2011 Report Share Posted March 27, 2011 Manuprāt smtp vaig norādīt lietotājvārdu un paroli. :) Varbūt log faili kaut ko saka? Quote Link to comment Share on other sites More sharing options...
EdgarsK Posted March 27, 2011 Report Share Posted March 27, 2011 gudri prati doma vienadi :D Quote Link to comment Share on other sites More sharing options...
Kemito Posted March 27, 2011 Report Share Posted March 27, 2011 cik zinu smtp arii vajag noradit username un paroli? :) + check the log file Gudrie vienmēr domā vienādi :D Quote Link to comment Share on other sites More sharing options...
briedis Posted March 27, 2011 Report Share Posted March 27, 2011 Iesaku izmantot phpMailer. $mail->IsSMTP(); // telling the class to use SMTP $mail->Host = "smtp@gmail.com"; // SMTP server $mail->SMTPAuth = true; // enable SMTP authentication $mail->SMTPSecure = "ssl"; // sets the prefix to the servier $mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server $mail->Port = 465; // set the SMTP port for the GMAIL server $mail->Username = "mails@gmail.com"; // GMAIL username $mail->Password = "parole"; // GMAIL password Tik vienkārši redz nav... Quote Link to comment Share on other sites More sharing options...
sandis_m Posted March 27, 2011 Report Share Posted March 27, 2011 (edited) Gudrie vienmēr domā vienādi :D Bieži negadās ko tādu redzēt =] Edit: Cepums abiem, viennozīmīgi. Edited March 27, 2011 by who_i_am Quote Link to comment Share on other sites More sharing options...
yeahz Posted March 27, 2011 Author Report Share Posted March 27, 2011 Kemito un Edgar -> āksti :D kā to username un paroli var norādīt? briedi -> vai tad tiešām ir jāinstalē phpMailer lai aizsūtītu pāris epastus? šis ir īstais? - http://www.askapache.com/php/phpfreaks-eric-rosebrocks-phpmailer-tutorial.html google izmeta vairākus phpMailerus Quote Link to comment Share on other sites More sharing options...
briedis Posted March 27, 2011 Report Share Posted March 27, 2011 Kemito un Edgar -> āksti :D kā to username un paroli var norādīt? briedi -> vai tad tiešām ir jāinstalē phpMailer lai aizsūtītu pāris epastus? šis ir īstais? - http://www.askapache.com/php/phpfreaks-eric-rosebrocks-phpmailer-tutorial.html google izmeta vairākus phpMailerus Jāuzinstalē veseli...divi faili... Jāatzipo, tas ir.. http://phpmailer.worxware.com/ Quote Link to comment Share on other sites More sharing options...
yeahz Posted March 27, 2011 Author Report Share Posted March 27, 2011 nevar jau saprast, kuri no šiem failiem tur jāvelk » PHPMailer for PHP4 » PHPMailer for PHP5/6 » PHPMailer-FE (Form2Email) » PHPMailer-ML » PHPMailer-BMH Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted March 27, 2011 Report Share Posted March 27, 2011 yeahz - jā, nav gan vienkārši. Gmails vispār ir nevienkāršs un, protams, ka gmaila SMTP serveri prasa autentifikāciju. Jāvelk atkarībā no PHP versijas, kuru izmanto pirmais vai otrais no tā saraksta. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.