mail gönderimi

Katılım
27 Şubat 2008
Mesajlar
307
Excel Vers. ve Dili
Office 2016
Sub makro6()
kullanici_sahibi = "******@gmail.com"
kullanici_parola = "*********"
Set objEmail = CreateObject("CDO.Message")
objEmail.From = kullanici_sahibi
objEmail.To = "*********@hotmail.com" 'Gönderilecek e-mail adresi
objEmail.Subject = "********"
objEmail.TextBody = "***********"
objEmail.AddAttachment "\\*******\****Paylasim\*****\kadro.xlsx"
With objEmail.Configuration.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = kullanici_sahibi
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = kullanici_parola
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
.Update
End With
objEmail.Send
MsgBox "DOSYA MAİL OLARAK GÖNDERİLMİŞTİR"
End Sub

yukarıdaki gibi bir kodum vardı. Önceden çalışmakta olan kod şu anda çalışmıyor. ("objEmail.Send") kısmı sarı oluyor. maili gönderim yapayımorum. Yardımcı olabilirmisiniz.
 
Üst