Ver Mensaje Individual
  #2 (permalink)  
Antiguo 23/03/2010, 02:28
DAL001
 
Fecha de Ingreso: marzo-2010
Mensajes: 3
Antigüedad: 14 años, 1 mes
Puntos: 0
Respuesta: Ayuda con email

Buenas yo lo hago funcionar de esta manera:

System.Net.Mail.MailMessage msg = New System.Net.Mail.MailMessage();
msg.To.Add([mail_destino]);
msg.Subject = [subject];
msg.From = [mail_origen];
msg.Body = generateBody([parametros]);
msg.BodyEncoding = System.Text.Encoding.UTF8;
msg.IsBodyHtml = True;

System.Net.Mail.SmtpClient smtp = New System.Net.Mail.SmtpClient(SMTP_Host);
smtp.EnableSsl = False;
smtp.UseDefaultCredentials = True;
smtp.Send(msg);
msg.Dispose();

En la función generateBody montas un String del estilo:

String auxHTML = String.Empty;
auxHTML =
"<HTML>" +
"<TABLE cellspacing='0' cellpadding='0' border='0'>" +
"<TR>" +
"<TD>" + TEXTO + "</TD>" +
"</TR>" +
"</TABLE>" +
"</HTML>";

return auxString;

En el HTML puedes usar imágenes, cuadros de texto, hyperlinks y todas las posibilidades del HTML.
Recuerda no olvidarte la linea que te he marcado en negrita, indicando que el cuerpo del mail está en formato HTML.

Espero te sea de ayuda.