Mail gonderme fonksiyonu;
Kullanımı:
PHP:
function mail_gonder($gmail,$gadsoy,$gonmail,$konu,$mesaj) {
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-9\n";
$headers .= "X-Mailer: PHP\n";
$headers .= "X-Sender: PHP\n";
$headers .= "From: $gadsoy<$gonmail>\n";
$headers .= "Reply-To: $gadsoy<$gonmail>\n";
$headers .= "Return-Path: $godsoy<$gonmail>\n";
@mail($gmail,$konu,$mesaj,$headers);
}
PHP:
$kime="[email protected]";
$isim="Mehmet";
$soyisim="Goldenberg";
$bilgi=$isim." ".$soyisim;
$kimden="[email protected]";
$konu="Bilgilendirm";
$tarih=date("d/m/Y");
$mesaj="Bu mail $soyisim, $isim tarafından $tarih adresinde gönderilmiştir";
mail_gonder($kime,$bilgi,$kimden,$konu,$mesaj);