<%@LANGUAGE = "VBSCRIPT"%> <% '--------------------------------------------------------- ' MailGönder (MailSender) v1.0 ' Translated (Çevirme) by Mustafa Agâh Öztürk ' MSN = tvisky@hotmail.com '-------------------------------------------------------- %> <% ' ================== MAILSENDER v. 1.0 ================== ' Code compiled by Will Collis [will@netsibition.co.uk] ' ' I do not provide any warranty or support. ' I am NOT liable for any use or misuse of this script. ' If you have any problems or queries. Google for it. ' HTMLArea v2 is by InteractiveTools [www.htmlarea.com] ' ' NB: The attachment functionality sends files from the ' computer that the script resides on. For Localhost use ' you are OK to attach. If you are using this on a server ' you should remember that the file path relates to the ' server's file structure, even the though the dialogue ' box asks for files on the client computer. You should ' remove or modify this yourself if this is a problem. ' ' If I get the time, I may well release a full-blown "v.2" ' with various email component support and a file upload ' for better attachment management. Thanks & Enjoy. ' ======================================================= 'Hadi başlayalım Function EmailCheck(sEmail) EmailCheck = false Dim regEx, retVal Set regEx = New RegExp regEx.Pattern ="^[\w-\.]{1,}\@([\da-zA-Z-]{1,}\.){1,}[\da-zA-Z-]{2,3}$" regEx.IgnoreCase = true retVal = regEx.Test(sEmail) If not retVal Then exit function End If EmailCheck = true End Function DateTime = Now() 'date time in şimdi olduğunu belirttik %> Mail Gönder (MailSender) v1.0 - Translated by TvisKy
Mail Gönder 'e Hoşgeldiniz...
<% If Request.Querystring("send") = "True" Then fmTo = Trim(Request.Form("fmTo")) fmFrom = Trim(Request.Form("fmFrom")) fmFromname = Trim(Request.Form("fmFromName")) fmCC = Trim(Request.Form("fmCC")) fmSubject = Trim(Request.Form("fmSubject")) fmBody = Trim(Request.Form("fmBody")) fmAttach = Request.Form("fmAttach") Call SendMail(fmTo,fmFrom,fmFromName,fmCC,fmSubject,fmBody,fmAttach) Else Response.Write("Lütfen formdaki alanları doldurunuz.") End If %>

Alıcı Email
Gönderen'in Email
Gönderen'in İsim
CC
Konu

Dosya Ekle
 

<%Response.write "Translated by TvisKy"%>
<% 'Mail göndermeye başlayalım Sub SendMail(smTo,smFrom,smFromName,smCC,smSubject,smBody,smAttach) On Error Resume Next 'Scriptte hata varsa strErr = "" 'Hatalara bakalım If EmailCheck(smTo) = False Then strErr = strErr & "
  • Alıcı Email adresi hatalı!
  • " End If If EmailCheck(smFrom) = False Then strErr = strErr & "
  • Gönderen'in Email adresi hatalı!
  • " End If If Len(smFromName) > 0 Then smFromage = smFromName & "<" & smFrom & ">" End If If strErr = "" Then 'Formda hata yoksa Set iMsg = CreateObject("CDO.Message") With iMsg .To = smTo .From = smFromage If Len(smCC) > 0 Then .CC = smCC End If .Subject = smSubject .HTMLBody = smBody If Len(smAttach) > 0 Then Set iBp = .AddAttachment(smAttach) End If .Send End With 'TemizLendi Set iMsg = Nothing If Len(smAttach) > 0 Then Set iBp = Nothing End If If Err > 0 Then 'Eğer bir problem varsa Response.Write("Mail Gönderilemedi! Hata Kodu:") Response.Write("