• 03-01-2013, 14:59:39
    #1
    Arkadaşlar bir programa mail gönderme ekledim ancak uyarı veriyor

    Dim iMsg, iConf, Flds
    
    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.gmail.com"
    Flds.Item(schema & "smtpserverport") = 465
    Flds.Item(schema & "smtpauthenticate") = 1
    Flds.Item(schema & "sendusername") = "xxx@gmail.com" ' Gmail ID miz
    Flds.Item(schema & "sendpassword") = "xxxx" ' Gmail Şifremiz
    Flds.Item(schema & "smtpusessl") = 1
    Flds.Update
    
    With iMsg
    .To = "xxx@hotmail.com" ' Hotmail Destekli
    .From = "Deneme" ' Kimden geldiği
    .Subject = "Ders" ' Mail Konu Başlığı
    .HTMLbOdy = Text1.Text
    .Organization = "Mail Organtion"
    .ReplyTo = "-"
    Set .Configuration = iConf
    SendEmailGmail = .Send
    End With
    Ancak kodu test ettiğimde
    Runtime error '-2147220978 (8004020e)':
    Sunucu gönderenin adresini reddetti.Sunucunun yanıtı 555 5.5.2
    syntax error. v46sm1038009005eep.1


    uyarı veriyor.
    Sorun ne olabilir acaba?
  • 03-01-2013, 21:08:41
    #2
    Üyeliği durduruldu
    Messi adlı üyeden alıntı: mesajı görüntüle
    Arkadaşlar bir programa mail gönderme ekledim ancak uyarı veriyor

    Dim iMsg, iConf, Flds
    
    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.gmail.com"
    Flds.Item(schema & "smtpserverport") = 465
    Flds.Item(schema & "smtpauthenticate") = 1
    Flds.Item(schema & "sendusername") = "xxx@gmail.com" ' Gmail ID miz
    Flds.Item(schema & "sendpassword") = "xxxx" ' Gmail Şifremiz
    Flds.Item(schema & "smtpusessl") = 1
    Flds.Update
    
    With iMsg
    .To = "xxx@hotmail.com" ' Hotmail Destekli
    .From = "Deneme" ' Kimden geldiği
    .Subject = "Ders" ' Mail Konu Başlığı
    .HTMLbOdy = Text1.Text
    .Organization = "Mail Organtion"
    .ReplyTo = "-"
    Set .Configuration = iConf
    SendEmailGmail = .Send
    End With
    Ancak kodu test ettiğimde
    Runtime error '-2147220978 (8004020e)':
    Sunucu gönderenin adresini reddetti.Sunucunun yanıtı 555 5.5.2
    syntax error. v46sm1038009005eep.1


    uyarı veriyor.
    Sorun ne olabilir acaba?
    587 değil mi gmail in smtp portu
  • 04-01-2013, 00:32:21
    #3
    smtp.gmail.com'un kullandığı SMTP portu 587'dir. Satırı aşağıdaki gibi düzenlemeniz sorunu çözecektir.
    Flds.Item(schema & "smtpserverport") = 587
  • 04-01-2013, 20:08:11
    #4
    Teşekkürler sorun çözüldü sağolun arkadaşlar