Joker Mesaj tarihi: Ağustos 28, 2012 Mesaj tarihi: Ağustos 28, 2012 php den hiç anlamıyorum .net çiyimde, çok ufak bişey gerekti. elimde bir php ile mail gönderme kodu var ama çalıştıramadım. yapması gereken query string'ten parametreleri alıp mail göndermesi. HATALAR : Warning: include(SMTPClass.php) [function.include]: failed to open stream: No such file or directory in /home/emailhos/public_html/index.php on line 3 Warning: include(SMTPClass.php) [function.include]: failed to open stream: No such file or directory in /home/emailhos/public_html/index.php on line 3 Warning: include() [function.include]: Failed opening 'SMTPClass.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/emailhos/public_html/index.php on line 3 AYRICA Query deki to değişkenini de almayı başaramadım. INDEX PHP : <?php include('SMTPconfig.php'); include('SMTPClass.php'); if($_SERVER[REQUEST_METHOD] == "POST") { $to = $_POST['to']; $from = $_POST['from']; $subject = $_POST['sub']; $body = $_POST['message']; $SMTPMail = new SMTPClient ($SmtpServer, $SmtpPort, $SmtpUser, $SmtpPass, $from, $to, $subject, $body); $SMTPChat = $SMTPMail->SendMail(); } ?> <form method="post" action=""> To:<input type="text" name="to" value="<?php $_GET['to'] ?>" /> From :<input type='text' name="from" /> Subject :<input type='text' name="sub" /> Message :<textarea name="message"></textarea> <input type="submit" value=" Send " /> </form> SMTPconfig.php : <?php //Server Address $SmtpServer="mail.XXX.com"; $SmtpPort="587"; //default $SmtpUser="[email protected]"; $SmtpPass="XXXX"; ?> SMTPClass.php : <?php class SMTPClient { function SMTPClient ($SmtpServer, $SmtpPort, $SmtpUser, $SmtpPass, $from, $to, $subject, $body) { $this->SmtpServer = $SmtpServer; $this->SmtpUser = base64_encode ($SmtpUser); $this->SmtpPass = base64_encode ($SmtpPass); $this->from = $from; $this->to = $to; $this->subject = $subject; $this->body = $body; if ($SmtpPort == "") { $this->PortSMTP = 25; } else { $this->PortSMTP = $SmtpPort; } } function SendMail () { if ($SMTPIN = fsockopen ($this->SmtpServer, $this->PortSMTP)) { fputs ($SMTPIN, "EHLO ".$HTTP_HOST."rn"); $talk[hello] = fgets ( $SMTPIN, 1024 ); fputs($SMTPIN, "auth loginrn"); $talk[res]=fgets($SMTPIN,1024); fputs($SMTPIN, $this->SmtpUser."rn"); $talk[user]=fgets($SMTPIN,1024); fputs($SMTPIN, $this->SmtpPass."rn"); $talk[pass]=fgets($SMTPIN,256); fputs ($SMTPIN, "MAIL FROM: <".$this->from.">rn"); $talk[From] = fgets ( $SMTPIN, 1024 ); fputs ($SMTPIN, "RCPT TO: <".$this->to.">rn"); $talk[To] = fgets ($SMTPIN, 1024); fputs($SMTPIN, "DATArn"); $talk[data]=fgets( $SMTPIN,1024 ); fputs($SMTPIN, "To: <".$this->to.">rnFrom: <".$this->from.">rnSubject:".$this->subject."rnrnrn".$this->body."rn.rn"); $talk[send]=fgets($SMTPIN,256); //CLOSE CONNECTION AND EXIT ... fputs ($SMTPIN, "QUITrn"); fclose($SMTPIN); // } return $talk; } } ?>
di Mesaj tarihi: Ağustos 28, 2012 Mesaj tarihi: Ağustos 28, 2012 Ne yavsak kodmus lan. Goz kirpip duruyor.
Seele Mesaj tarihi: Ağustos 28, 2012 Mesaj tarihi: Ağustos 28, 2012 dosyayi bulamamis iste SMTPClass.php
Pluton Mesaj tarihi: Ağustos 28, 2012 Mesaj tarihi: Ağustos 28, 2012 Baya önce yazdığım bir makale var. Bayada detaylı yazmışım nası yazmışım lan ben onu :D http://www.mrhades.net/php/phpmailer-nedir-nasil-mail-gonderilir.html işini görür heralde
Joker Mesaj tarihi: Ağustos 28, 2012 Konuyu açan Mesaj tarihi: Ağustos 28, 2012 Class'ın c si küçük kalmış. dosyayı ondan bulamamış :D birde şu getQueryString'i çözersek hallolcak sanırım
di Mesaj tarihi: Ağustos 28, 2012 Mesaj tarihi: Ağustos 28, 2012 Ahah, hataya bile bakmadiydim da, klasik case-sentitive dosya sisteminden bi haber vindozcu olayi olmus.
toggie Mesaj tarihi: Ağustos 28, 2012 Mesaj tarihi: Ağustos 28, 2012 Pluton said: Baya önce yazdığım bir makale var. Bayada detaylı yazmışım nası yazmışım lan ben onu :D http://www.mrhades.net/php/phpmailer-nedir-nasil-mail-gonderilir.html işini görür heralde sunu ben ekliyim de favorilere. lazım oluyor.
Joker Mesaj tarihi: Ağustos 28, 2012 Konuyu açan Mesaj tarihi: Ağustos 28, 2012 bu satırdaki problem nedir peki?
Kojiroh Mesaj tarihi: Ağustos 28, 2012 Mesaj tarihi: Ağustos 28, 2012 echo dememişsin ?> Bi de eğer short tags olayı açıksa 'ın kısayolu olan = ... ?>'ı kullanabilirsin.
Joker Mesaj tarihi: Ağustos 28, 2012 Konuyu açan Mesaj tarihi: Ağustos 28, 2012 evet oldu çok teşekkürler. ama mail html coded gitmiyor plain text gidiyor :( eğer kolay bi şekilde ayarlanmıyorsa başka hazır kod arıcam heralde.
Pluton Mesaj tarihi: Ağustos 28, 2012 Mesaj tarihi: Ağustos 28, 2012 Okadar verdik hazır kodunu işte ama illa bu olacak diyosan ayar dosyasında falan illaki vardır
nedanko Mesaj tarihi: Ağustos 28, 2012 Mesaj tarihi: Ağustos 28, 2012 verileri sanitize etmeyi unutma.
Mr_Hand Mesaj tarihi: Ağustos 28, 2012 Mesaj tarihi: Ağustos 28, 2012 Bu arada bugün aptana studio diye bişeye rastladım. Çok güzel görünüyo.
Pluton Mesaj tarihi: Ağustos 28, 2012 Mesaj tarihi: Ağustos 28, 2012 İndirdim gece inceler yazarım bişiler bakalım benimde hoşuma gitti
nedanko Mesaj tarihi: Ağustos 28, 2012 Mesaj tarihi: Ağustos 28, 2012 eed :) textmate'den sublime a gectim bende. gerci textmate opensource oldu, onda da hareketlilik bekliyom tekrar. aptana kullandim bi sure guzel bi IDE. Ben genel olarak IDE den sogudum, text editorlere donus yaptim. yoksa aptana oldukca guzel.
Öne çıkan mesajlar