bir sitem var php tabanlı ve buradan onay bekleyen üyelerime otomatik mail gönderiyor sistem. ancak bu otomatik mailler, kullanıcıların epostalarında "junk" a düşüyor. bunu nasıl engellerim ?
Normal olarak info@siteadı.com gibi bir adresten gönderdiğimde herhangi bir problem olmuyor. ancak otomatik giden (sistem tarafından gönderilen) mailler junka gidiyor.
bu konuda bilgi verebilecek birine ihtiyacım var.
Google Apps aracılığıyla bu sorun çözülebilir mi ?
Teşekkürler
Smtp ile gönderirsen inbox kısmına gelmesi çok yüksek ama bazı mail siteleri yine de junk kısmına atabiliyor. Hotmail de sorun yok ama Yahoo da var galiba örnek olarak. Hoş zaten Godaddy'nin bir çok mail bile spam kısmına düşüyor Yahoo'da.
Otomatik mail yollayan prosedür içerisinde mail sunucusuna bağlantını oturum açarak yaptırırsan problem düzelecektir. Sunucun üzerinde bir mail adresi oluştur ve Otomatik Mail yollayan prosedür içinde SSL veya hangi tür bağlantı çeşidi ile bağlantı sağlanıyorsa o şekilde oturum açmasını sağlatırsan problemin düzelecektir.
Kendi kullanıdğım smtp kodum. mail() fonksiyonundan daha iyidir.
$smtpServer = "mail.domain"; //ip accepted as well $port = "25"; // should be 25 by default $timeout = "30"; //typical timeout. try 45 for slow servers $username = "mail adresi"; //the login for your smtp $password = "mailinin şifresi"; //the pass for your smtp $localhost = "127.0.0.1"; //this seems to work always $newLine = "\r\n"; //var just for nelines in MS $secure = 0; //change to 1 if you need a secure connect
/* you shouldn't need to mod anything else */
//connect to the host and port $smtpConnect = fsockopen($smtpServer, $port, $errno, $errstr, $timeout); $smtpResponse = fgets($smtpConnect, 4096); if(empty($smtpConnect)) { $output = "Bağlantı Kurulamadı: $smtpResponse"; return $output; } else { $logArray['connection'] = "Bağlandı: $smtpResponse"; }
//say HELO to our little friend fputs($smtpConnect, "HELO $localhost". $newLine); $smtpResponse = fgets($smtpConnect, 4096); $logArray['heloresponse'] = "$smtpResponse";
//start a tls session if needed if($secure) { fputs($smtpConnect, "STARTTLS". $newLine); $smtpResponse = fgets($smtpConnect, 4096); $logArray['tlsresponse'] = "$smtpResponse";
//you have to say HELO again after TLS is started fputs($smtpConnect, "HELO $localhost". $newLine); $smtpResponse = fgets($smtpConnect, 4096); $logArray['heloresponse2'] = "$smtpResponse"; }
//observe the . after the newline, it signals the end of message fputs($smtpConnect, "To:$to\r\n From:$from\r\nSubject:$subject\r\n$headers\r\n\r\n$message\r\n.\r\n"); $smtpResponse = fgets($smtpConnect, 4096); $logArray['data2response'] = "$smtpResponse";
// say goodbye fputs($smtpConnect,"QUIT" . $newLine); $smtpResponse = fgets($smtpConnect, 4096); $logArray['quitresponse'] = "$smtpResponse"; $logArray['quitcode'] = substr($smtpResponse,0,3); fclose($smtpConnect); //a return value of 221 in $retVal["quitcode"] is a success return($logArray); }