• 04-09-2010, 22:26:03
    #1
    Selam Arkadaşlar. söyle bi sorunum var ben php ile html mail göndertiyorum.
    fakat html mail içinde mailin gönderen ismine yazılan kısımda olan isim mail de görünsün istiyorum fakat olmuyor.
    İstediğim herşey biçimle gidiyor fakat o gönderen ve alıcı isimlerini yapamıyorum.
    Şu Gittigidiyorun gönderdiği mailler gibi resim içinde alıcının ismi gidiyor.

    Kod Bu:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>untittled</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9">
    </head>
    <style type="text/css"> 
    body
    {
       background-color: #000000;
       color: #000000;
    }
    </style> 
    <body>
    <?php
    $gonder_isim=$_POST["gonder_isim"];
    $gonder_mail=$_POST["gonder_mail"];
    $alan_isim=$_POST["alan_isim"];
    $alan_mail=$_POST["alan_mail"];
    $Konu=$_POST["Konu"];
    if ($gonder_mail!==""){
     
            if (!eregi("^.+@.+\\..+$", $gonder_mail))
            {
                    $errorMes4="HATA! - email adresinizin dogrulugunu lutfen Kontrol edin.. "; $error=1;
            }
            else
                    $mail=trim($gonder_mail);
    }
    else { $errorMes5="E-mail Adresini yazmalisin.. "; $error=1; }
    if ($error=="1"){
            echo ("<title>mail yanlis yazildi..</title>
            <body><br>
            <p style=\"font:11pt arial\"><font color=red>Mail <font color=red> İletilemedi..!</font>
            $errorMes1<br>$errorMes2<br>$errorMes3<br>$errorMes4<br>$errorMes5<br>$errorMesA<br>$errorMesB<br>$errorMesC<br>
    <br><a href=\"index.php\" style=\"color:blue\">Geri Don</a> </body></html>"); exit(0);
    }
    else {
     
    $gonder_isim=$_POST["gonder_isim"];
    $gonder_mail=$_POST["gonder_mail"];
    $alan_isim=$_POST["alan_isim"];
    $alan_mail=$_POST["alan_mail"];
    $baslik= "Sana Selam Söyleyen Biri Var! " ;
    $mesaj=  $body = '<HTML>
      <HEAD>
        <META http-equiv="Content-Type" content="text/html; charset=utf-8">
        <META name="GENERATOR" content="BLOCKNOTE.NET">
        <META name="source">
        <BASEFONT face="Times New Roman" size="3">
        <TITLE></TITLE><STYLE>BODY { FONT-FAMILY:Times New Roman; FONT-SIZE:12pt }
    P { FONT-FAMILY:Times New Roman; FONT-SIZE:12pt }
    DIV { FONT-FAMILY:Times New Roman; FONT-SIZE:12pt }
    TD { FONT-FAMILY:Times New Roman; FONT-SIZE:12pt }
    </STYLE>
      </HEAD>
    <BODY>
    <DIV><IMG src="resim1"></DIV>
    <DIV>&nbsp;</DIV>
    <DIV><FONT face="Arial" color=#ff6600> <STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Selam! alıcı ;</FONT></STRONG></DIV>
    <DIV><STRONG><FONT face="Arial" color=#ff6600> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Arkadaşın (Gönderen)  sana mesaj gönderdi. </FONT></STRONG></DIV>
    <DIV>&nbsp;</DIV>
    
    <DIV><FONT face="Arial" color=#ff6600> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(gönderici) Kişisinin E-Posta Adresi: &nbsp; (Gönderen E-Mail) </FONT></DIV>
    <DIV><FONT face="Arial" color=#ff6600> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></DIV>
    <DIV><FONT face="Arial" color=#ff6600>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SAYGILAR</FONT></DIV>
    <DIV> &nbsp;&nbsp;</DIV>
    <DIV><IMG src="resim2" border="0" usemap="#Map">
    <map name="Map" id="Map">
      <area shape="rect" coords="9,3,296,34" href="site" target="_self" />
      <area shape="rect" coords="318,48,351,60" href="site" target="_self" />
    </map></DIV>
    <DIV>&nbsp;&nbsp;&nbsp;</DIV>
    </BODY>
    </HTML><ul>';
    
    
    $mailtanim = "MIME-Version: 1.0\r\n";  
    $mailtanim .= "Content-type: text/html; charset=utf-8\r\n";
    $mailtanim .= "From: $name <SelamSoyle.co.cc>\r\n";
    $mailtanim .= "Baslik :  <Sana Selam Söyleyen Biri Var>\r\n";
    $mailtanim .= "Reply-To: $name <SelamSoyle.co.cc>\r\n";
     
    mail($alan_mail,$baslik,stripslashes($mesaj),$mailtanim);
    }
    echo "<center> "
    ?>
    </body>
    <center>
    <!-- Begin Publishing Scripts of Flash Menu menu -->
    <object id="fm_menu_menu" width="285px" height="27px" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
      codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0">
    <param name="movie" value="menu.swf" /><param name="quality" value="high" />
    <param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" />
    <param name="scale" value="noscale" /><param name="salign" value="LT" /><param name="menu" value="false" />
    <embed type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"
      width="285px" height="27px" bgcolor="#000000" wmode="transparent" src="menu.swf"
      quality="high" scale="noscale" menu="false" salign="LT" />
    </object>
    <!-- End Publishing Scripts of Flash Menu menu --> </center>
    <div style="text-align: center; "><img alt="" src="resim" /></div>
    </html>
    <br>
    <center>
    <br>
     
    
    <br>
    <br>
     <center>
    <br>
    </object>

    altı çizili yerlere php kodları gelecek

    NOT:htaccess ve iframe gbi yöntemleri denedim
  • 06-09-2010, 09:32:29
    #2
    gönderici ve alıcı dediğiniz yerlere php ile değişken atıyormusunuz <?php echo $alan_isim ?> gibi..
  • 07-09-2010, 03:23:45
    #3
    denedim hocam olmuyor
  • 07-09-2010, 04:40:40
    #4
    zaten php kodu açıkken <? echo "$gonder_isim"; ?> olarak denemek hataya yol açar.
    Gönderen: .$gonder_isim. metnin devamı
    şeklinde denersen çözülmesi lazım.
  • 07-09-2010, 10:39:40
    #5
    KahvaLti adlı üyeden alıntı: mesajı görüntüle
    zaten php kodu açıkken <? echo "$gonder_isim"; ?> olarak denemek hataya yol açar.
    Gönderen: .$gonder_isim. metnin devamı
    şeklinde denersen çözülmesi lazım.
    doğru php tagının açık olduğunu görmemişim.

    Bu şekilde yapabilirsin.
  • 07-09-2010, 12:57:43
    #6
    yok hocam böylede olmadı bu sefer kod olduğu gbi gitti

    Her yolu denedim olmuyor. Başka Bir Çözümü Yokmu ?
  • 08-09-2010, 00:36:47
    #7
    ".$gonder_isim." şeklinde denermisin.
  • 08-09-2010, 01:15:39
    #8
    sc0rpi10 adlı üyeden alıntı: mesajı görüntüle
    ".$gonder_isim." şeklinde denermisin.
    Denedim hocam olmuyor HTML kod içine php kod yerleştiremiyorum
  • 08-09-2010, 01:19:16
    #9
    pm ile msn gönderirsen bakalım bir.