Kod:
Function SendMail(BelgeAdi)
Dim iMsg, iConf, Flds, schema
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
schema = "http://schemas.microsoft.com/cdo/configuration/"
Flds.Item(schema & "sendusing") = 2
Flds.Item(schema & "smtpserver") = "smtp.istyonetim.com.tr"
Flds.Item(schema & "smtpserverport") = 587
Flds.Item(schema & "smtpauthenticate") = 1
Flds.Item(schema & "sendusername") = "[email protected]"
Flds.Item(schema & "sendpassword") = ""
Flds.Item(schema & "smtpusessl") = 1
Flds.Update
veri1 = txtEklenti
With iMsg
.To = Me.Metin62 & " ; " & acilan10.Column(0) & " ; " & acilan11.Column(0) & " ; " & acilan12.Column(0) & " ; " & acilan13.Column(0) & " ; " & acilan14.Column(0) & " ; " & acilan15.Column(0) & " ; " & acilan16.Column(0) & " ; " & acilan17.Column(0)
.From = "Gönderen Adı Soyadı ( [email protected] )"
.Subject = "Deneme Konu"
.HTMLBody = "Deneme Metin"
.Sender = "xx"
.Organization = "[email protected]"
.ReplyTo = "[email protected]"
.AddAttachment BelgeAdi
Set .Configuration = iConf
.send
End With
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
MsgBox ("mail gönderildi")
Kill BelgeAdi
End Function