* AZ ÖNCE KODLANDI. DENENDİ.
TOPLU MAİL GÖNDER
<%
mode = request.querystring("mode")
' ------------------ [MAİL AYARLARI] ------------------
SMTPKullaniciAdi = "bilgi@sorhocam.com"
SMTPSifre = "XXXXXXXX"
SMTPSunucuAdresi = "smtp.sorhocam.com"
DomainAdi = "sorhocam.com"
if mode = "kontrol" then
call kontrol
elseif mode = "gonder" then
call gonder
else
call mail
end if
%>
<%sub mail%>
<%end sub%>
<%
sub kontrol
session.timeout = 1440
session("sure") = Request.Form("Sure")
session("konu") = Request.Form("Konu")
session("mesaj") = Request.Form("Mesaj")
response.redirect "?mode=gonder"
end sub
%>
<%
Sub gonder
On Error Resume Next
sira = request.querystring("sira")
if sira = "" then
sira = "1"
else
sira = sira
end if
SMTPSunucuAdresi = "smtp."+DomainAdi
GonderenAdSoyad = SMTPKullaniciAdi
GonderenKisi = SMTPKullaniciAdi
Set MKonf = CreateObject("CDO.Configuration")
Sch = "http://schemas.microsoft.com/cdo/configuration/"
Set Alnlr = MKonf.Fields
With Alnlr
.Item(Sch & "sendusing") = 2
.Item(Sch & "smtpserver") = SMTPSunucuAdresi
.Item(Sch & "smtpserverport") = 587
.Item(Sch & "smtpauthenticate") = 1
.Item(Sch & "sendusername") = SMTPKullaniciAdi
.Item(Sch & "sendpassword") = SMTPSifre
.Update
End With
for i = 1 to 1
set rs = conn.execute("select id,adi,soyadi,email from tbl where id="&sira&"")
if rs.eof then exit for
AliciKisi = rs("email")
Set CDOM = CreateObject("CDO.Message")
CDOM.Configuration = MKonf
CDOM.From = GonderenAdSoyad & "<" & GonderenKisi & ">"
CDOM.To = AliciKisi
CDOM.Subject = Session("konu")
CDOM.HtmlBody = Session("mesaj")
CDOM.Send
Response.write "Konu : "&session("konu")&"
"
Response.write rs("adi")&" "&rs("soyadi")&"
"
Response.write rs("email")&"
"
Response.write ""&sira&" gonderiliyor... "
Response.Write""
next
Set CDOM = Nothing : Set Alnlr = Nothing : Set MKonf = Nothing
rs.close : set rs = nothing
end sub
%>