Sub mailgonder()
'Türkçe Karakter hatası yaparsa Rem yazan satırlardaki sadece "Rem" yazısını sil.'
duzgun = Array("ı", " Ğ", "ğ", " Ü", "ü", "Ü", " Ö", "ö", "Ö", " Ç", "ç", "Ç", "İ", "Ğ", " Ş", "ş", "Ş")
bozuk = Array("ı", " Ğ", "ğ", " Ü", "ü", "Ü", " Ö", "ö", "Ö", " Ç", "ç", "Ç", "İ", "Ğ", " Ş", "ş", "Ş")
sonsatir3 = Sheets("Anadosya").Cells(Rows.Count, 1).End(xlUp).Row
uygunlukdurumu = Application.WorksheetFunction.Match("Uygunluk Durumu", Sheets("AnaDosya").Range("A1:ZZ1"), 0)
For ki = 2 To sonsatir3
If Cells(ki, 5) = "" Then GoTo Devam
If Cells(ki, uygunlukdurumu).Value = "Yas veya Bölüm Uygun Degil." Then
Application.EnableEvents = False
Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
Set fso = CreateObject("Scripting.FilesystemObject")
Set Signature = fs

penTextFile("C:\Users\*.htm", 1)
With OutMail
.SentOnBehalfOfName = "*.COM"
.To = Cells(ki, 5)
.CC = "*.com"
.BCC = ""
.Subject = "Deneme"
.HTMLBody = "<BODY style=font-size:11pt;font-family:Calibri>Değerli Adayımız</body>" & Cells(ki, 2) & Signature.readall
For j = 0 To UBound(duzgun)
.HTMLBody = Replace(.HTMLBody, duzgun(j), bozuk(j))
Next j
.Display
'.Send'
End With
On Error GoTo 0
Set OutMail = Nothing: Set OutApp = Nothing:
Application.EnableEvents = True
Application.ScreenUpdating = True
End If
Devam:
Next
End Sub