Ver Mensaje Individual
  #16 (permalink)  
Antiguo 22/11/2007, 13:24
nancy8120
 
Fecha de Ingreso: enero-2006
Mensajes: 233
Antigüedad: 19 años, 4 meses
Puntos: 2
Re: error con envio de email

mi envio de email esta funcionando bien mientras no le ponga todo el body es decir
si al cuerpo del email solo le pongo una linea asi
htmlmail.body="<img src=""cid:" & logotp & """>&nbsp;<FONT face=arial size=6 color=#000099><B>Tetra Pak</B></FONT><BR><BR>"
me funciona bien y me llegan los mail pero
si lo pongo completo se demora mucho en caragar y no me llegan los email
no se que esta mal ?
este es el codigo pero el problema esta en el cuerpo del email bye gracias


'En caso de que el estatus del Reporte sea Rechazado, se envía un mail a la persona que
'generó el Reporte para que esté enterada
'Obtiene datos del empleado que elaboró el reporte
for i=0 to ubound(LaDatosStatus,2)
if LaDatosStatus(6,i) <> LaDatosStatus(1,i) then
if LaDatosStatus(1,i)="3" then

Set LrsEmpleadoElaboraID = Server.CreateObject("ADODB.Recordset")
Set LrsEmpleadoElaboraMail = Server.CreateObject("ADODB.Recordset")
Set LrsEmpleadoOwnerNombre = Server.CreateObject("ADODB.Recordset")

lsSql="select usuario_clave from vw_datos_empleado where empleado_clave = '" & LaDatosStatus(5,i) & "'"
LrsEmpleadoElaboraID.open lsSql, conINTRANET
lsEmpleadoElaboraID=LrsEmpleadoElaboraID("usuario_ clave")
lsSql="select email from usuario where usuario_clave='" & trim(lsEmpleadoElaboraID) &"'"

LrsEmpleadoElaboraMail.open lssql,conINTRANET
lsEmpleadoElaboraMail=LrsEmpleadoElaboraMail("emai l")

lsSql="select empleado from vw_datos_empleado where empleado_clave = '" & LaDatosStatus(7,i) & "'"
LrsEmpleadoOwnerNombre.open lsSql, conINTRANET
lsNombreEmpleado=LrsEmpleadoOwnerNombre("empleado" )

Set htmlmail = CreateObject("Persits.MailSender")
htmlmail.IsHTML = True
'señalo el servidor de salida para enviar el correo
htmlmail.Host = "mail.xxxxx.com"
'indico la dirección de correo del remitente
htmlmail.From = "Sistema_de_Reporte_de_Gastos"
'indico la dirección del destinatario del mensaje
htmlmail.AddAddress lsEmpleadoElaboraMail
htmlmail.Subject = "Reporte Rechazado"


logotp = htmlmail.AddAttachment(Server.MapPath("../images/lllogo.gif"))


'Arma Cuerpo del Programa
htmlmail.body="<img src=""cid:" & logotp & """>&nbsp;<FONT face=arial size=6 color=#000099><B>fff</B></FONT><BR><BR>"&_
"<FONT face=arial size=5 color=#999999><B>AVISO DE REPORTE RECHAZADO</B></FONT><BR>"&_
"<TABLE border=0 cellpadding=0 cellspacing=0 width=350>"&_
"<TR><TD colspan=2><HR width=100% color=#000099><BR></TD></TR>"&_
"<TR><TD width=100><FONT face=arial size=2 color=#000099><B>Fecha:</B></FONT></TD>"&_
"<TD><FONT face=arial size=2 color=#000000>" & formateafecha(DATE()) & "</FONT></TD></TR>"&_
"</TABLE>"&_
"<TABLE border=0 cellpadding=0 cellspacing=0 width=350>"&_
"<TR><TD height=20></TD></TR>"&_
"<TR><TD colspan=1><FONT face=arial size=2 color=#000099><B>Reporte Número:</B></FONT></TD><TR>"&_
"<TR><TD><P align=justify><FONT face=arial size=2 color=#000000>" & LaDatosStatus(0,i) &"</FONT></P></TD></TR>"&_
"<TR><TD colspan=1 height=20></TD></TR>"&_

"<TR><TD height=20></TD></TR>"&_
"<TR><TD colspan=1><FONT face=arial size=2 color=#000099><B>A nombre de:</B></FONT></TD><TR>"&_
"<TR><TD><P align=justify><FONT face=arial size=2 color=#000000>" & lsNombreEmpleado &"</FONT></P></TD></TR>"&_
"<TR><TD colspan=1 height=20></TD></TR>"&_
"<TR><TD colspan=1><FONT face=arial size=2 color=#000099><B>Comentarios:</B></FONT></TD><TR>"&_
"<TR><TD><P align=justify><FONT face=arial size=2 color=#000000>" & LaDatosStatus(2,i) & "</FONT></P></TD></TR>"&_
"</TABLE>"&_

"<TABLE border=0 cellpadding=0 cellspacing=0 width=350>"&_
"<TR><TD colspan=1 height=20></TD></TR>"&_
"<TR><TD><FONT face=arial size=2 color=#000099><B>Por favor verifica el Reporte, imprímelo y entrégalo a Contabilidad.</B></FONT> &nbsp; <FONT face=arial size=2 color=#000000></FONT></TD></TR>"&_
"<TR><TD><FONT face=arial size=2 color=#000099><B>Gracias.</B></FONT> &nbsp; <FONT face=arial size=2 color=#000000></FONT></TD></TR>"&_
"</body></html>"

htmlmail.Send

'Destruye objetos
Set LrsEmpleadoElaboraID = nothing
Set LrsEmpleadoElaboraMail = nothing
set rsEmpleadoOwnerNombre=nothing

end if
end if
next