million Posted January 25, 2009 Report Share Posted January 25, 2009 Labdien! Kam jau ir kods pogai ar iespeju nosutit e-mail "draugam" ar komentari un url link? Piemeram, ir galerija ar bildem, atverot vienu ir poga, nospiezot to atveras neliels lodzins ar formu: Kam (e-mail) No ka (e-mail) Tema (subject) Teksts (komentari un links, no kura nosutija). Pateicos! Link to comment Share on other sites More sharing options...
waplet Posted January 25, 2009 Report Share Posted January 25, 2009 uztaisi formas, un tad vienkārši , caur mail funkciju. mail() Link to comment Share on other sites More sharing options...
million Posted January 26, 2009 Author Report Share Posted January 26, 2009 uztaisi formas, un tad vienkārši , caur mail funkciju.mail() Paldies, par padomu. Bet neesmu parliecinats, ka pats to paveiksu :( Link to comment Share on other sites More sharing options...
NiTrino Posted January 26, 2009 Report Share Posted January 26, 2009 (edited) http://paste.php.lv/62548f6dd1c76770ab7196...27c75c?lang=php līdz minimumam vienkāršs piemērs Edited January 26, 2009 by NiTrino Link to comment Share on other sites More sharing options...
million Posted January 26, 2009 Author Report Share Posted January 26, 2009 http://paste.php.lv/62548f6dd1c76770ab7196...27c75c?lang=php līdz minimumam vienkāršs piemērs Liels paldies!!! Vel jautajums: ka nokonfiguret Return-Path: ? Jo kad nosutu zinojumu paradas hostinga majas lapa ar erroru un Return-Path: ierakstits hostinga e-mail adrese. Pat divi jautajumi. Vai man pasam jaizvedo atsevisku mailu, kurs bus rakstits Return-path? Link to comment Share on other sites More sharing options...
NiTrino Posted January 26, 2009 Report Share Posted January 26, 2009 Pārlabo $headers = 'From: '.$from."\r\n" . 'Reply-To: '.$from."\r\n" . 'X-Mailer: PHP/' . phpversion()."\r\n". Return-Path: info@my_site.com\r\n"; tie varbūt nav pilnākie headeri ko sūtīt bet nu var mēģināt atrast labākus Link to comment Share on other sites More sharing options...
million Posted January 26, 2009 Author Report Share Posted January 26, 2009 Pārlabo $headers = 'From: '.$from."\r\n" . 'Reply-To: '.$from."\r\n" . 'X-Mailer: PHP/' . phpversion()."\r\n". Return-Path: info@my_site.com\r\n"; tie varbūt nav pilnākie headeri ko sūtīt bet nu var mēģināt atrast labākus Paldies! Izdariju sekojosi: $headers = 'From: '.$from."\r\n" . 'Reply-To: '.$from."\r\n" . 'Return-Path: 'info@my_site.lv"\r\n". 'X-Mailer: PHP/' . phpversion(); Kas nav pareizi? Link to comment Share on other sites More sharing options...
NiTrino Posted January 26, 2009 Report Share Posted January 26, 2009 sintakses kļūda $headers = 'From: '.$from."\r\n" . 'Reply-To: '.$from."\r\n" . 'Return-Path: \'info@my_site.lv\''."\r\n". 'X-Mailer: PHP/' . phpversion(); Link to comment Share on other sites More sharing options...
million Posted January 26, 2009 Author Report Share Posted January 26, 2009 sintakses kļūda $headers = 'From: '.$from."\r\n" . 'Reply-To: '.$from."\r\n" . 'Return-Path: \'info@my_site.lv\''."\r\n". 'X-Mailer: PHP/' . phpversion(); Paldies! Kaut kas nav pareizi. Ieakstot 'Return-Path: \'info@my_site.lv\''."\r\n". rindu, nesuta mailus. Bet bez tas suta, bet noradot hostinga ipasnieka adresi... Varbut man vajag ieraksit (izveidot) sava maila konfiguraciju? Link to comment Share on other sites More sharing options...
NiTrino Posted January 26, 2009 Report Share Posted January 26, 2009 Pamēģini šo Link to comment Share on other sites More sharing options...
million Posted January 27, 2009 Author Report Share Posted January 27, 2009 http://paste.php.lv/62548f6dd1c76770ab7196...27c75c?lang=php līdz minimumam vienkāršs piemērs Labdien! Vai varetu, ludzu, pateikt kur un kas japieraksta, lai automatiski un slepeni kopiju butu nosutita uz konkretu adresi? function send_mail ($to, $subject, $body, $from) { $headers = 'From: '.$from."\r\n" . 'Reply-To: '.$from."\r\n" . 'X-Mailer: PHP/' . phpversion(); return mail($to, "=?UTF-8?B?".base64_encode($subject)."?=", $body, $headers); Link to comment Share on other sites More sharing options...
million Posted February 1, 2009 Author Report Share Posted February 1, 2009 Labdien! Vai varetu, ludzu, pateikt kur un kas japieraksta, lai automatiski un slepeni kopiju butu nosutita uz konkretu adresi? function send_mail ($to, $subject, $body, $from) { $headers = 'From: '.$from."\r\n" . 'Reply-To: '.$from."\r\n" . 'X-Mailer: PHP/' . phpversion(); return mail($to, "=?UTF-8?B?".base64_encode($subject)."?=", $body, $headers); Vai kads, ludzu, palidzeu? Link to comment Share on other sites More sharing options...
Aleksejs Posted February 1, 2009 Report Share Posted February 1, 2009 Ņemot vērā tavu pēdējā atbildē minēto kodu, var aizsūtīt, ja mainīgajam $to piešķir vērtību slepena@adrese.adr Link to comment Share on other sites More sharing options...
million Posted February 1, 2009 Author Report Share Posted February 1, 2009 Ņemot vērā tavu pēdējā atbildē minēto kodu, var aizsūtīt, ja mainīgajam $to piešķir vērtību slepena@adrese.adr Paldies. Bet tas jau nebutu to, ko es gribu. Jo $to ir mainigais, kurs norada kuram tiks sutita vestule, bet paraleli tam un slepeni kopiju janosuta uz konkretu adresi. Te ir kods, kuru es izmantoju: http://paste.php.lv/62548f6dd1c76770ab7196...27c75c?lang=php Link to comment Share on other sites More sharing options...
Aleksejs Posted February 1, 2009 Report Share Posted February 1, 2009 nu tad izpildi sava koda mail rindiņu divreiz: vienreiz sūtot uz $to, otrreiz uz slepeno adresi. $res = mail($to, "=?UTF-8?B?".base64_encode($subject)."?=", $body, $headers); return mail('slepena@adrese.adr', "=?UTF-8?B?".base64_encode($subject)."?=", $body, $headers) && $res; Link to comment Share on other sites More sharing options...
Recommended Posts