Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/10/2010, 12:30
TheDark03
 
Fecha de Ingreso: mayo-2010
Ubicación: Lima, Peru.
Mensajes: 176
Antigüedad: 13 años, 10 meses
Puntos: 6
Concatenar css con cadena html - mail asp

Bueno, muy buenas tardes a todos, supongo que de repente puede ser un poco obvia mi pregunta pero para mi mala suerte no se ven los estilos al email que envio por correo... y la verdad no se por que no salen.

Si cuando pongo la pagina que se envía en un navegador se ve excelente, pero al outtlook llega una desgracia, también he probado con el servidor hotmail hay se muestran algunos estilos pero no todos.

Antes de que respondan en vano, aclaro que he probado poniendo el css en rutas absolutas, es decir el archivo css esta colgado en el servidor y tampoco; lo he puesto en la misma cadena de envió pero igual no se llega a mostrar adecuadamente.

Les adjunto mi codigo asp
Código ASP:
Ver original
  1. <%
  2. sch = "http://schemas.microsoft.com/cdo/configuration/"
  3.  
  4. Set cdoConfig = CreateObject("CDO.Configuration")
  5.  
  6. With cdoConfig.Fields
  7.         .Item(sch & "sendusing") = 2 ' cdoSendUsingPort
  8.         .Item(sch & "smtpserver") = "mail.mydominio.com"
  9.         .update
  10. End With
  11.  
  12. function iif(psdStr, trueStr, falseStr)
  13.   if psdStr then
  14.     iif = trueStr
  15.   else
  16.     iif = falseStr
  17.   end if
  18. end function
  19.  
  20. Dim objetoMail
  21. Set objetoMail = Server.CreateObject ( "CDO.Message" )
  22. if request.form("FullName")<>"" then
  23.   ok = true
  24. else
  25.   ok = false
  26. end if
  27.  
  28. if ok then
  29. ' Creamos el objeto email
  30. Set objetoMail.Configuration = cdoConfig
  31.  
  32. ' Configuramos el email
  33. objetoMail.From         = "[email protected]"
  34. objetoMail.To            = "[email protected]"
  35. 'objetoMail.MailFormat = cdoMailFormatMIME
  36. objetoMail.Subject         = "Contact Us "
  37. 'objetoMail.BodyFormat = cdoBodyFormatHTML
  38. 'objetoMail.contentBase="http://www.mydominio.com/Peru"
  39.  
  40. sMsgHTML ="<html xmlns=http://www.w3.org/1999/xhtml><head><meta http-equiv=Content-Type content=text/html; charset=utf-8 /><title>by TheDark03</title><style>table{width:400px;background:#f0f0f0;font-family:verdana;font-size:11px;} table span{display:block;font-family:verdana;font-size:14px;color:#666666;font-weight:bold;text-align:center;background:#FFFFFF;padding:5px;} table td{width:200px;} table td.caption{width:200px;color:#666666;font-weight:bold;;padding:3px;}</style></head><body><br> <table width='400' border='1' cellpadding='0' cellspacing='0' bordercolor='#666666' background='#ddd'>"
  41. sMsgHTML=sMsgHTML+"<tr> <td colspan='2'><div align='center'><img src='http://www.amazingperu.com/images/logocontact.jpg' ></div></td> </tr>"
  42. sMsgHTML=sMsgHTML+"<tr> <td colspan='2'><span>CONTACT US</span></td></tr>"
  43.  
  44. 'Split("VBScriptXisXfun!", "x", -1, 1)
  45. 'FullName,Email,Country,PhoneNumber,Address,WheredidYouhearAboutus,SuscribeNewsletter,QuestionsAndRequests
  46. fmdatos=Split("FullName,Email,Country,PhoneNumber,Address,WheredidYouhearAboutus,QuestionsAndRequests",",",-1,1)
  47.  
  48. for each d in fmdatos
  49. sMsgHTML = sMsgHTML+" <tr> <td class='caption'>"&d&"</td><td>"&Request.Form(d)&" </td></tr> "
  50. next
  51. sMsgHTML = sMsgHTML+" <tr> <td class='caption'>Date Contact</td><td>"&now&" </td></tr> "
  52. sMsgHTML =sMsgHTML+"</table></body></html> "
  53. objetoMail.htmlBody     = sMsgHTML
  54. ' Enviamos el email
  55. objetoMail.Send
  56. ' Destruimos el objeto email
  57. end if
  58. Set objetoMail = Nothing
  59.  
  60. %>

Espero que me puedan ayudar. Gracias ante todo!

Saludos DLB