 |
 |
|
DizelMakina.Com.Tr
Merkez : Halkalı Cd. Şimşek
San. Sit. No:24 Sefaköy İST.
Tel: (0212)580 43 07 (0212) 579 50 73
Fax: (0212) 599
50 38
E-mail:
bilgi@dizelmakina.com.tr
Şube 1: Hadımköy Yolu 15. Km Ömerli Mevkii Namık
Kemal Cad.(Soyak Beton Karşısı) Hadımköy / İstanbul
Gsm: 0536 617 83 33
Email:
meftun@dizelmakina.com.tr
Showroom: 4.Bölge San. Cad. Çakmaklı Işıklar No:80 A/7
Kıraç - Beylikdüzü / İstanbul Tel : (0212) 886 74 24 - 25
|
 |
|
Copyright
2007 FixRank.Com |
|
 |
<%
'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(" - " & Err.Description & "
")
Else 'Başarılar! Mail Gönderildi
Response.Write("Mail Gönderildi! Kime: " & smTo & " Gün: " & FormatDateTime(DateTime,vbLongDate) & " Saat: " & FormatDateTime(DateTime,vbLongTime))
smTo = ""
smFrom = ""
smFromName = ""
smCC = ""
smSubject = ""
smBody = ""
smAttach = ""
End If
Else 'Eğer gönderilemediyse neden gönderilemediğini yazalım ki gönderen hatasını düzeltsin
Response.Write("Mail Gönderilemedi! Hata Kodu:")
Response.Write("<%
'---------------------------------------------------------
' MailGönder f.1
' Translated (Çevirme) by Fixrank
' MSN = info@fixrank.com
'--------------------------------------------------------
%>
<%@LANGUAGE = "VBSCRIPT"%>
<%
'---------------------------------------------------------
' MailGönder f1.0
' Translated (Çevirme) by FixRank.Com
' MSN = info@fixrank.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
<%
'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("
|
|