03/02/2011, 10:42
|
| | Fecha de Ingreso: agosto-2007
Mensajes: 23
Antigüedad: 17 años, 4 meses Puntos: 0 | |
Respuesta: Problema formulario ASP CÓDIGO ENVIARNOTAPEDIDO
Código:
<%@LANGUAGE='VBSCRIPT' CODEPAGE='1252'%>
<%
if enviarMail(generarMail()) then
response.Redirect("solicitud.asp?enviada=si")
else
response.Redirect("solicitud.asp?enviada=no")
end if
public function enviarMail(bodyHTML)
set objMail = server.CreateObject("Persits.MailSender")
objMail.Host = "mail.artmaniadecoracion.com"
objMail.Port = 25
objMail.From = "[email protected]"
objMail.AddAddress "[email protected]", "Artmania"
'objMail.AddBcc "[email protected]"
objMail.FromName = request.Form("frazonsocial")
objMail.Subject = "Nota Pedido Artmania"
objMail.ContentTransferEncoding = "Quoted-Printable"
objMail.Body = bodyHTML
objMail.IsHTML = true
if objMail.send then
enviarMail = true
else
enviarMail = false
end if
end function
public function generarMail()
dim strBody, url, nReg
url = ""
strBody = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>"
strBody = strBody & "<html xmlns='http://www.w3.org/1999/xhtml'>"
strBody = strBody & "<head>"
strBody = strBody & "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />"
strBody = strBody & "<title>NOTA DE PEDIDO - La Moldurera</title>"
strBody = strBody & "<link rel='stylesheet' rev='stylesheet' href='" & url & "estilos.css' />"
strBody = strBody & "<style type='text/css'>.textForm{border-width:0px;font-weight:500;}"
strBody = strBody & "#nota{font-family:Verdana, Arial, Helvetica, sans-serif;font-size:18px;font-weight:bolder;}"
strBody = strBody & ".textCelda{border:1px solid #111111; height:28px;}"
strBody = strBody & ".textCelda2{border-top:1px solid #111111; border-left:0px solid #111111; border-bottom:1px solid #111111;border-right:1px solid #111111; height:28px;}"
strBody = strBody & ".textCelda3{border-top:0px solid #111111; border-left:1px solid #111111; border-bottom:1px solid #111111;border-right:1px solid #111111; height:28px;}"
strBody = strBody & ".textCelda32{border-top:0px solid #111111; border-left:0px solid #111111; border-bottom:1px solid #111111;border-right:1px solid #111111; height:28px;}"
strBody = strBody & ".texto{font-size:10px;text-indent:4px}"
strBody = strBody & ".direccion{font-size:9px;font-family:Verdana;font-weight:600;}</style>"
strBody = strBody & "</head><body>"
strBody = strBody & "<table cellpadding='0' cellspacing='0' align='center'>"
strBody = strBody & " <tr>"
strBody = strBody & " <td valign='bottom'>"
strBody = strBody & " <table style='float:left;margin-top:50px' cellpadding='0' cellspacing='0'>"
strBody = strBody & " <tr>"
strBody = strBody & " <td valign='bottom' id='nota'>NOTA DE PEDIDO</td>"
strBody = strBody & " </tr>"
strBody = strBody & " <tr>"
strBody = strBody & " <td class='textCelda'>"
strBody = strBody & " <div class='texto'>FECHA</div>"
strBody = strBody & " <div align='right' style='margin-top:-5px'>"
strBody = strBody & " " & request.Form("ffecha") & "</div>"
strBody = strBody & " </td>"
strBody = strBody & " </tr>"
strBody = strBody & " </table>"
strBody = strBody & " <div style='float:left;margin-left:100px'><img src='Images/logoNota.jpg' alt='' /></div>"
strBody = strBody & " <div style='float:right;text-align:right;margin-top:35px' class='direccion'>"
strBody = strBody & " <div style='font-size:14px'>Artmania Decoración, S.L.</div>"
strBody = strBody & " Padre Juan de Mariana, 20 . 45534 La Mata (TO) España<br />"
strBody = strBody & " Tel.: 34/925 74 70 16 / Fax: 34/925 74 72 66<br />"
strBody = strBody & " E [email protected] / W www.artmania.com"
strBody = strBody & " </div>"
strBody = strBody & " </td>"
strBody = strBody & " </tr>"
strBody = strBody & " <tr>"
strBody = strBody & " <td>"
strBody = strBody & " <table cellpadding='0' cellspacing='0' width='100%'>"
strBody = strBody & " <tr>"
strBody = strBody & " <td class='textCelda'>"
strBody = strBody & " <div class='texto'>RAZÓN SOCIAL</div>"
strBody = strBody & " <div align='right' style='margin-top:-5px'>"
strBody = strBody & " " & request.Form("frazonsocial") & "</div>"
strBody = strBody & " </td>"
strBody = strBody & " <td class='textCelda2'>"
strBody = strBody & " <div class='texto'>NOMBRE COMERCIAL</div>"
strBody = strBody & " <div align='right' style='margin-top:-5px'>"
strBody = strBody & " " & request.Form("fnombrecomercial") & "</div>"
strBody = strBody & " </td>"
strBody = strBody & " </tr> "
strBody = strBody & " </table>"
strBody = strBody & " </td>"
strBody = strBody & " </tr>"
strBody = strBody & " <tr>"
strBody = strBody & " <td>"
strBody = strBody & " <table cellpadding='0' cellspacing='0' width='100%'>"
strBody = strBody & " <tr>"
strBody = strBody & " <td class='textCelda3'>"
strBody = strBody & " <div class='texto'>C.I.F. / N.I.F. / CÓDIGO</div>"
strBody = strBody & " <div align='right' style='margin-top:-5px'>"
strBody = strBody & " " & request.Form("fnifcif") & "</div>"
strBody = strBody & " </td>"
strBody = strBody & " <td class='textCelda32'>"
strBody = strBody & " <div class='texto'>DOMICILIO</div>"
strBody = strBody & " <div align='right' style='margin-top:-5px'>"
strBody = strBody & " " & request.Form("fdomicilio") & "</div>"
strBody = strBody & " </td>"
strBody = strBody & " <td class='textCelda32'>"
strBody = strBody & " <div class='texto'>C.P.</div>"
strBody = strBody & " <div align='right' style='margin-top:-5px'>"
strBody = strBody & " " & request.Form("fcp") & "</div>"
strBody = strBody & " </td>"
strBody = strBody & " </tr> "
strBody = strBody & " </table>"
strBody = strBody & " </td>"
strBody = strBody & " </tr>"
strBody = strBody & " <tr>"
strBody = strBody & " <td>"
strBody = strBody & " <table cellpadding='0' cellspacing='0' width='100%'>"
strBody = strBody & " <tr>"
strBody = strBody & " <td class='textCelda3'>"
strBody = strBody & " <div class='texto'>POBLACIÓN</div>"
strBody = strBody & " <div align='right' style='margin-top:-5px'>"
strBody = strBody & " " & request.Form("fpoblacion") & "</div>"
strBody = strBody & " </td>"
strBody = strBody & " <td class='textCelda32'>"
strBody = strBody & " <div class='texto'>PROVINCIA / PAÍS</div>"
strBody = strBody & " <div align='right' style='margin-top:-5px'>"
strBody = strBody & " " &
|