tester Posted December 7, 2007 Report Share Posted December 7, 2007 sveiki, man majas ir savs serveris jaunakais apache -2.2.x (precizi no galvas neaceros versijas nr) jaunakais php 5 vis pec manam domam nokonfigurets pareizi gan php gan apache uztadijumos vis strada ka vajg iznjemot mail sutishanas skiptu... saulaik biju uzraxtijis mail sutishanas skriptu ar formu kuru biju domajis izmantot sava web lapa uzliekot uz servera un testejot nez kape nenosutijas mails kludu nevareju atrast un ta saku testet - izmantoju php net piejamo paraugu - <?php // multiple recipients $to = 'aidan@example.com' . ', '; // note the comma $to .= 'wez@example.com'; // subject $subject = 'Birthday Reminders for August'; // message $message = ' <html> <head> <title>Birthday Reminders for August</title> </head> <body> <p>Here are the birthdays upcoming in August!</p> <table> <tr> <th>Person</th><th>Day</th><th>Month</th><th>Year</th> </tr> <tr> <td>Joe</td><td>3rd</td><td>August</td><td>1970</td> </tr> <tr> <td>Sally</td><td>17th</td><td>August</td><td>1973</td> </tr> </table> </body> </html> '; // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $headers .= 'To: Mary <mary@example.com>, Kelly <kelly@example.com>' . "\r\n"; $headers .= 'From: Birthday Reminder <birthday@example.com>' . "\r\n"; $headers .= 'Cc: birthdayarchive@example.com' . "\r\n"; $headers .= 'Bcc: birthdaycheck@example.com' . "\r\n"; // Mail it mail($to, $subject, $message, $headers); ?> ar shadu kodu mails nosutat bet tik lidz lieku shini pasakuma ieksha formu nekas neizdoad ... piem uzraku te vienu paraudzinju kurma ari pec mana mdomama vajadzetu stradat bet nez kape tas nestrada - index.html <body> <form method="post" action="mail.php"> <textarea name="uzmailu"></textarea> <br /> <input name="submit" type="submit" value="sūtīt" /> </form> </body> </html> mail.php <?php if (!empty($_POST['uzmailu']) && trim($_POST['uzmailu'])) mail('mans_pasts@inbox.lv', 'Subject lauks, jauns komentars',$_POST['uzmailu']); ?> ps. nesu ipashi zinosh shaja lieta tapec ludzu jusu padomu kas pa vainu un ko daru nepareizi ? paldies jau ieprieks ! Link to comment Share on other sites More sharing options...
andrisp Posted December 7, 2007 Report Share Posted December 7, 2007 Testē uz Win, ja ? php konfigurācijā vajag SMTP datus pareizus savadīt. Link to comment Share on other sites More sharing options...
tester Posted December 7, 2007 Author Report Share Posted December 7, 2007 HEEELP, esmu akls - nemāku atrast ADD REPLY pogu uz win , smtp konfiguracija pec manam domam ir pareiza - ne nu varbut vari iedot kadu piemeru ka ta butu jaraxta pareizi ? mosh tur man kas skibi aizgajis ? bet tada gadijuma ja tur kluda konfiguracija kapec viena varianta suta mailu un otraa nee ? Link to comment Share on other sites More sharing options...
p4F Posted December 7, 2007 Report Share Posted December 7, 2007 (edited) HEEELP, esmu akls - nemāku atrast ADD REPLY pogu iedo savas konfiguracijas, paskatīšos kas nepareizs! bet vispaar izvada kaadas kluudas? Edited December 7, 2007 by bubu Link to comment Share on other sites More sharing options...
tester Posted December 7, 2007 Author Report Share Posted December 7, 2007 (edited) HEEELP, esmu akls - nemāku atrast ADD REPLY pogu kludas neizvada .. php.ini [mail function] ; For Win32 only. SMTP = mail.tk.lv < mana provaidera mail serveris smtp_port = 25 ; For Win32 only. ;sendmail_from = home.tk.lv < mana provaidera mail serveris ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ;sendmail_path = ; Force the addition of the specified parameters to be passed as extra parameters ; to the sendmail binary. These parameters will always replace the value of ; the 5th parameter to mail(), even in safe mode. ;mail.force_extra_parameters = Edited December 7, 2007 by bubu Link to comment Share on other sites More sharing options...
andrisp Posted December 7, 2007 Report Share Posted December 7, 2007 Es kārtīgi neizlasīju, ka tev ar piemēra skriptu sūtas. Tātad SMTP nav vaina. Kodā vaina. Esi pārliecināts, ka šis izpildās kā true ? !empty($_POST['uzmailu']) && trim($_POST['uzmailu']) Link to comment Share on other sites More sharing options...
tester Posted December 7, 2007 Author Report Share Posted December 7, 2007 (edited) a ka butu pareizi ? - sory macos tik php tapec isti daudz ko neizprotu Edited December 7, 2007 by tester Link to comment Share on other sites More sharing options...
p4F Posted December 7, 2007 Report Share Posted December 7, 2007 pameigini šo kodu if ($_POST['uzmailu']) { mail('lala@laala.lv, 'Subject lauks, jauns komentars',$_POST['uzmailu']); echo "izdevās"; } else { echo "neizdevās"; } Link to comment Share on other sites More sharing options...
andrisp Posted December 7, 2007 Report Share Posted December 7, 2007 !empty($_POST['uzmailu']) && trim($_POST['uzmailu']) Tikai tagad pamanīju :). Pirmajā vietā tu pārbaudi vai gadijumā nav tukš, otrā - vai nav pilns. Tātad nekad nebūtu true. Link to comment Share on other sites More sharing options...
tester Posted December 7, 2007 Author Report Share Posted December 7, 2007 <?php if ($_POST['uzmailu']) { mail('www_wlf@inbox.lv', 'Subject lauks, jauns komentars',$_POST['uzmailu']); echo "izdevās"; } else { echo "neizdevās"; } ?> nu parada ka izdevas - bet mails nepienak :( kur lai mekle kibeli ? Link to comment Share on other sites More sharing options...
tester Posted December 7, 2007 Author Report Share Posted December 7, 2007 nu kur nozudat ? kadz plz varetu palidzeet? Link to comment Share on other sites More sharing options...
Aleksejs Posted December 7, 2007 Report Share Posted December 7, 2007 Uzliec tīkla analizatoru: wireshark un paskaties ko saka SMTP serveris. Link to comment Share on other sites More sharing options...
Aleksejs Posted December 7, 2007 Report Share Posted December 7, 2007 Kur nozudi!!! Izdarīji kā lika?! Link to comment Share on other sites More sharing options...
tester Posted December 7, 2007 Author Report Share Posted December 7, 2007 nesaprotu ka isti man to panakt ar wireshark .. ludzu apskaidro siikak Link to comment Share on other sites More sharing options...
andrisp Posted December 7, 2007 Report Share Posted December 7, 2007 Ar to taču viņš tikai nočakarēsies un viss. Ja jau tev manuāļa piemērs strādāja, tad izmanto to. Protams, pielāgojot. Link to comment Share on other sites More sharing options...
Recommended Posts