Bende uzun uğraşlar sonu yapabilmiştim, mail fonksiyonu artık desteklenmediğinden smtp kullanmak gerekiyor, aşağıda benim kullandığım smtp kontrol sayfasının mail gönderme yerleri mevcut, smtp_host diye başlayan ilk sıralı alana ilgili detayları gmail veya kendi site adresinin mail detaylarını yazmalısın, bununla ilgili nette çok bilgi var. Çoklu mail gönderme özelliğide var bu kodun mailleri virgülle ayırmak gerek.
include("../../class/class.phpmailer.php");
$t_smtp_host = $site_smtp_host;
$t_smtp_username = $site_smtp_username;
$t_smtp_password = $site_smtp_password;
$t_smtp_add_reply_to = $site_smtp_add_reply_to;
$t_smtp_from = $site_smtp_username;
$t_smtp_from_name = $site_smtp_from_name;
$t_smtp_smtp_auth = $site_smtp_auth;
$t_smtp_smtp_secure = $site_smtp_secure;
$t_smtp_smtp_port = $site_smtp_port;
$t_smtp_add_adress = $site_iletisim_mail;
$t_smtp_smtp_subject = $site_smtp_from;
$t_isim = $t_isim;
$t_soyisim = $t_soyisim;
$t_telefon = $t_telefon;
$t_mail = $t_mail;
$t_mesaj = $t_mesaj;
$message = "Tarih :".$s_tarih."<br />".
"Geldiği Konum : ilgix.com İletişim Formu<br />".
"İsim Soyisim:".$t_isim."<br />".
"E-Mail :".$t_mail."<br /><p>".
"Mesaj :".$t_mesaj."</p>"."\n";
$t_smtp_smtp_wordwrap = "80";
$t_smtp_body = nl2br($message);
$t_smtp_smtp_charset = "utf-8";
try {
$mail = new PHPMailer(true); //New instance, with exceptions enabled
//$body = file_get_contents('contents.html');
//$body = preg_replace('/\\\\/','', $body); //Strip backslashes
$body = $t_smtp_body;
$mail->IsSMTP(); // tell the class to use SMTP
$mail->SMTPAuth = $t_smtp_smtp_auth; // enable SMTP authentication
$mail->SMTPSecure = $t_smtp_smtp_secure; // Options are "", "ssl" or "tls"
$mail->Port = $t_smtp_smtp_port; // set the SMTP server port
$mail->Host = $t_smtp_host; // SMTP server
$mail->Username = $t_smtp_username; // SMTP server username
$mail->Password = $t_smtp_password; // SMTP server password
$mail->CharSet = $t_smtp_smtp_charset;
//$mail->IsSendmail(); // tell the class to use Sendmail
$mail->AddReplyTo($t_smtp_add_reply_to,$t_smtp_from_name);
$mail->From = $t_smtp_from;
$mail->FromName = $t_smtp_from_name;
$t_s_m_m_a_dizi = explode(',',$t_smtp_add_adress);
$t_s_m_m_a_dizi_say = count($t_s_m_m_a_dizi);
$dizi_sayac = 0;
while($dizi_sayac < $t_s_m_m_a_dizi_say)
{
$t_smtp_add_adress = $t_s_m_m_a_dizi[$dizi_sayac];
$mail->AddAddress($t_smtp_add_adress);
$dizi_sayac++;
}
//$mail->AddAttachment($t_smpt_add_attachment); // attachment
$mail->Subject = $t_smtp_smtp_subject;
//$mail->AltBody = $t_smtp_smtp_altbody; // optional, comment out and test
$mail->WordWrap = $t_smtp_smtp_wordwrap; // set word wrap
$mail->MsgHTML($body);
$mail->IsHTML(true); // send as HTML
$mail->Send();
//$_SESSION['iletisim_uyari'] = 'Mesajınız Ulaşmıştır Teşekkürler';
//header("Location:$geldigi_yer");
//exit();
} catch (phpmailerException $e) {
//echo $e->errorMessage();
//$_SESSION['iletisim_uyari'] = $e->errorMessage(); //'Hata ! Mesajınız Ulaşmadı Lütfen Doğrudan Mail Gönderin';
//header("Location:$geldigi_yer");
//exit();
}
İlgin için teşekkür ederim. Bu kodları bilgisayarıma aldım. Daha sonra lazım olduğunda kullanacağım. Hosting firmamla görüşüp mail fonksiyonunu aktif ettirdim ve direkt mail fonksiyonu ile işlem yapıyorum.