Asp ile Toplu Mail Gönderme kodu

'Web Programlama' forumunda Leon tarafından 25 Nisan 2015 tarihinde açılan konu

  1. Leon

    Leon Moderator Site Yetkilisi

    Asp ile toplu mail gönderimi yapabilme kodu

    Kod:
     Case "cdonts"
             
                   Set objMail = Server.CreateObject("CDONTS.NewMail")
                   With objMail
                        .From = strSiteAdi & " <" & Kimden & ">"
                        .To = strSiteTitle & " <" & Kime & ">"
                        .Subject = Konu
                        .Body = Mesaj
                        .BodyFormat = 0
                        .MailFormat = 0
                        .Importance = 1
                        .Send
                   End With
                   Set objMail = Nothing
                  
              Case "cdosys"
             
                   Set objMail = Server.CreateObject("CDO.Message")
                   Set objConfig = Server.CreateObject("CDO.Configuration")
    
                       With objConfig
                            If strMailSMTPUsername <> "" AND strMailSMTPPass <> "" Then 
                                .Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 0
                                .Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = strMailSMTPUsername
                                .Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = strMailSMTPPass
                        End If
                           .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strMailServer
                           .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")  = 25
                           .Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
                           .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "c:\inetpub\mailroot\pickup" 
                           .Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
                           .Fields.Update
                      End With
    
                   Set objMail.Configuration = objConfig
                   With objMail
                        .From = strSiteAdi & " <" & Kimden & ">"
                        .To = Kime
                        .Subject = Konu
                        .HTMLBody = Mesaj
                        .Send
                   End With
                   Set objMail = Nothing 
     

Bu Sayfayı Paylaş