Envío de correo electrónicos.
Hola quiero desarrollar un programa que me permita enviar correos electrónicos masivos hata el momento solo usaba este método para poder enviar un correo electrónico pero es solo para uno, aquí te envío el método para que puedas verlo.. Por favor si me podrías explicar con un poco de detalle para poder entender al 100% muchas gracias
Sub enviarCorreo()
Dim correo As New System.Net.Mail.MailMessage()
correo.To.Add(Me.txtCorreo.Text)
Dim direccionRemitente As New System.Net.Mail.MailAddress( _
"[email protected]", _
"Rmulo Len (Gerente de Servicios)")
correo.From = direccionRemitente
correo.Subject = "Confirmacin de registro"
correo.IsBodyHtml = True
correo.Body = "<img src=''/>" & _
"
<h2>Sistemas Super Inteligentes</h2>
<hr/>
" & _
"Hola " & Me.txtNombres.Text & ": <br/><br/>" & _
"Te damos la bienvenida, gracias por registrate" & _
"Los datos con los que se registr son: " & _
"
<table border=1 cellspacing=0 cellpadding=4>
" & _
"
<tr>
<td><strong>Nombres</strong></td>
<td>" & txtNombres.Text & "</td>
</tr>
" & _
"
<tr>
<td><strong>Usuario</strong></td>
<td>" & Me.txtUsuario.Text & "</td>
</tr>
" & _
"
<tr>
<td><strong>Contrasea</strong></td>
<td>" & Me.txtClave.Text & "</td>
</tr>
" & _
"
<tr>
<td><strong>Edad</strong></td>
<td>" & Me.txtEdad.Text & "</td>
</tr>
" & _
"
</table>
"
Dim servidorSMTP As New System.Net.Mail.SmtpClient("mail.geniomax.com")
servidorSMTP.Credentials = New System.Net.NetworkCredential( _
"[email protected]", "1u2n3i4")
servidorSMTP.Send(correo)
End Sub
Sub enviarCorreo()
Dim correo As New System.Net.Mail.MailMessage()
correo.To.Add(Me.txtCorreo.Text)
Dim direccionRemitente As New System.Net.Mail.MailAddress( _
"[email protected]", _
"Rmulo Len (Gerente de Servicios)")
correo.From = direccionRemitente
correo.Subject = "Confirmacin de registro"
correo.IsBodyHtml = True
correo.Body = "<img src=''/>" & _
"
<h2>Sistemas Super Inteligentes</h2>
<hr/>
" & _
"Hola " & Me.txtNombres.Text & ": <br/><br/>" & _
"Te damos la bienvenida, gracias por registrate" & _
"Los datos con los que se registr son: " & _
"
<table border=1 cellspacing=0 cellpadding=4>
" & _
"
<tr>
<td><strong>Nombres</strong></td>
<td>" & txtNombres.Text & "</td>
</tr>
" & _
"
<tr>
<td><strong>Usuario</strong></td>
<td>" & Me.txtUsuario.Text & "</td>
</tr>
" & _
"
<tr>
<td><strong>Contrasea</strong></td>
<td>" & Me.txtClave.Text & "</td>
</tr>
" & _
"
<tr>
<td><strong>Edad</strong></td>
<td>" & Me.txtEdad.Text & "</td>
</tr>
" & _
"
</table>
"
Dim servidorSMTP As New System.Net.Mail.SmtpClient("mail.geniomax.com")
servidorSMTP.Credentials = New System.Net.NetworkCredential( _
"[email protected]", "1u2n3i4")
servidorSMTP.Send(correo)
End Sub
1 Respuesta
Respuesta de Roberto Alvarado