Tengo un select el cual retorna varios registros, los cuales deseo que se
incluyan en el body del email. Cómo puedo incluír un while sin que aparezca
en el texto y que funcione claro está.
Dim objdruser As SqlDataReader
Dim sqluser As String = "select u.Firstn + ' ' + u.Lastn name, u.email from
users u"
Dim Cmduser As New SqlCommand(sqluser, connection)
connection.Open()
objdruser = Cmduser.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
If objdruser.Read = True Then
Dim iMsg As New CDO.Message
With iMsg
.To = "" & objdruser("name") & " <" & objdruser("email") & ">"
.From = "" & username & " <xxx@xxx.com>"
.Subject = "Text"
.HTMLBody = "<p><font size=""3"" face=""Arial, Helvetica,
sans-serif"">Users:<BR><B>" & objdruser("name") & "</B>font></p>"
.Send()
End With
iMsg = Nothing
End If
Leer las respuestas