Torna al Thread

For i = 1 To Max Dim MYSQL3 As String Dim MYCMD3 As SqlCommand Dim MYDR3 As SqlDataReader MYSQL3 = "QUI SELEZIONO LE EMAIL" MYCMD3 = New SqlCommand(MYSQL3, Conn) MYDR3 = MYCMD3.ExecuteReader Dim myEmail As New Net.Mail.MailMessage Dim Email As String myEmail.IsBodyHtml = False myEmail.BodyEncoding = System.Text.Encoding.UTF8 myEmail.From = New MailAddress("pippo@pluto.com", "MITTENTE") myEmail.Subject = VarTitolo If MYDR3.HasRows = True Then Do While MYDR3.Read If Regex.IsMatch(MYDR3.Item("EMAIL"), "\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*") Then Email = MYDR3.Item("EMAIL") myEmail.Bcc.Add(Email) 'Response.Write(Email & "<br>") End If Loop End If myEmail.Body = "TESTO" Dim mySmtpClient As New System.Net.Mail.SmtpClient mySmtpClient.Timeout = 3000000 mySmtpClient.Send(myEmail) Next
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5