• 04-10-2009, 00:04:45
    #1
    merhabalar benim ufak bir sorunum var yardım edebilirseniz sevinirim

    mail gönderen kod aşağıda
    isim tescilden hostum var


    <?
    include_once("conn.php");
    
    if (isset($_POST[s1]))
    {
    	$Username = strip_tags($_POST[username]);
    
    	if(empty($Username))
    	{
    		$error = "Enter your username!";
    	}
    	else
    	{
    		$q1 = "select * from counter_members where username = '$Username' ";
    		$r1 = mysql_query($q1) or die(mysql_error());
    
    		if(mysql_num_rows($r1) == '1')
    		{
    			if($a1 = mysql_fetch_array($r1))
    			{
    				//send an email
    				$to = $a1[EmailAddress];
    				$subject = "Your password at $_SERVER[HTTP_HOST]";
    				$message = "Hello $a1[Names],\nhere is your login information for $_SERVER[HTTP_HOST]\n\nUsername: $a1[username]\nPassword: $a1[password]\n\nTo login, follow this link:\nhttp://$_SERVER[HTTP_HOST]/login.php\n\nThank you for your registration!";
    
    				$headers = "MIME-Version: 1.0\n"; 
    				$headers .= "Content-type: text/plain; charset=iso-8859-1\n";
    				$headers .= "Content-Transfer-Encoding: 8bit\n"; 
    				$headers .= "From: $_SERVER[HTTP_HOST] <$aset[ContactEmail]>\n"; 
    				$headers .= "X-Priority: 1\n"; 
    				$headers .= "X-MSMail-Priority: High\n"; 
    				$headers .= "X-Mailer: PHP/" . phpversion()."\n"; 
    
    				mail($to, $subject, $message, $headers);		
    
    				header("location:forgot_ok.php?to=$to");
    				exit();
    			}
    		}
    		else
    		{
    			$error = "Invalid Username!";
    		}
    
    	}
    }
    
    include_once("includes.php");
    include_once("template/header.php");
    include_once("template/forgot_template.php");
    include_once("template/footer.php");
    ?>

    bu kod mail göndermiyor


    destek talebi gönderdim bana bu maili gönderdiler

    Sayın Müşterimiz,

    SPAM politikası gereği bazı değişiklikler yapılmıştır. Mail Gönderici veya MailFrom kısmında Alan Adınızı içeren bir Mail adresi belirtmeniz gerekir. Aksi halde Mail gönderemezsiniz. Aşağıda Sistemden bir çıktı gösterilmektedir. "sallama@sallama.com" sahte bir Mail adresi ile kayıt olunmuş ve Sistemden "Forgot Password" ile yeni şifre istenmiştir. Şifreyi gönderen Mail adresi olarak "root@linuxeko2.isimtescil.net" görünmektedir. Kodlarınızı düzenleyiniz.

    Sunucu=127.0.0.1 - Gonderici=root@linuxeko2.isimtescil.net - Alici=sallama@sallama.com - Status=AccessDenied


    örnek mail kodu da bu

      <?php
    
    $to = "gondermek-istediginiz-adres@alan-adi.com";
    $subject = "Test";
    $message = "Test..\nwww.isimtescil.net";
    
    $headers = "From: size-ait-adres@alan-adiniz.com\r\n";
    $headers .= "Reply-To: size-ait-adres@alan-adiniz.com\r\n";
    $headers .= "Return-Path: size-ait-adres@alan-adiniz.com\r\n";
    
    if ( mail($to,$subject,$message,$headers) ) {
       echo "Email gönderildi..";
       } else {
       echo "Email gönderilemedi!!!";
       }
    ?>

    açaba en üsteki scripti nasıl düzenleebilirim yardımlarınızı bekliyorum.saygılarımla
  • 04-10-2009, 10:41:08
    #2
    Kimlik doğrulama veya yönetimden onay bekliyor.
    //send an email
    $to = $a1[EmailAddress];
    $subject = "Your password at $_SERVER[HTTP_HOST]";
    $message = "Hello $a1[Names],\nhere is your login information for $_SERVER[HTTP_HOST]\n\nUsername: $a1[username]\nPassword: $a1[password]\n\nTo login, follow this link:\nhttp://$_SERVER[HTTP_HOST]/login.php\n\nThank you for your registration!";

    $headers = "MIME-Version: 1.0\n";
    $headers .= "Content-type: text/plain; charset=iso-8859-1\n";
    $headers .= "Content-Transfer-Encoding: 8bit\n";
    $headers .= "From: $_SERVER[HTTP_HOST] <$aset[ContactEmail]>\n";
    $headers .= "X-Priority: 1\n";
    $headers .= "X-MSMail-Priority: High\n";
    $headers .= "X-Mailer: PHP/" . phpversion()."\n";

    mail($to, $subject, $message, $headers);


    Kodunu düzenleyeceksin kendine göre.
  • 04-10-2009, 14:09:23
    #3
    asimus adlı üyeden alıntı: mesajı görüntüle
    //send an email
    $to = $a1[EmailAddress];
    $subject = "Your password at $_SERVER[HTTP_HOST]";
    $message = "Hello $a1[Names],\nhere is your login information for $_SERVER[HTTP_HOST]\n\nUsername: $a1[username]\nPassword: $a1[password]\n\nTo login, follow this link:\nhttp://$_SERVER[HTTP_HOST]/login.php\n\nThank you for your registration!";
    $headers = "MIME-Version: 1.0\n";
    $headers .= "Content-type: text/plain; charset=iso-8859-1\n";
    $headers .= "Content-Transfer-Encoding: 8bit\n";
    $headers .= "From: $_SERVER[HTTP_HOST] <$aset[ContactEmail]>\n";
    $headers .= "X-Priority: 1\n";
    $headers .= "X-MSMail-Priority: High\n";
    $headers .= "X-Mailer: PHP/" . phpversion()."\n";
    mail($to, $subject, $message, $headers);
    Kodunu düzenleyeceksin kendine göre.
    düzenledim çalışmadı