cara eu fiz assim mas num deu certo:
<!--#include file="conecta.asp"-->
<%
set rs = conexao.execute("SELECT * FROM pedidos WHERE num_pedido='"&request.QueryString("num_pedido")&"' AND cod_cliente='"&request.QueryString("cod")&"' AND vendedor='"&request.QueryString("nome")&"'")
%>
mail = mail&" <style type="text/css"> "
mail = mail&" <!--"
mail = mail&" .style2 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; }"
mail = mail&" -->"
mail = mail&" </style>"
mail = mail&"<table width="800" height="529" border="0" align="center" cellpadding="0" cellspacing="0">"
mail = mail&" <tr>"
mail = mail&" <td height="135"><img src="top.jpg" width="800" height="135" /></td>"
mail = mail&" </tr>"
mail = mail&" <tr>"
mail = mail&" <td height="347"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000">"
mail = mail&" <tr>"
mail = mail&" <td width="13%"><div align="center" class="style2">CODIGO</div></td>"
mail = mail&" <td width="59%"><div align="center" class="style2">NOME</div></td>"
mail = mail&" <td width="17%"><div align="center" class="style2">QUANTIDADE</div></td>"
mail = mail&" <td width="11%"><div align="center" class="style2">VALOR</div></td>"
mail = mail&" </tr>"
mail = mail&" <tr>"
mail = mail&" <td><% do while not rs.eof %>"
mail = mail&" <% response.Write rs("codigo") %>"
mail = mail&" </td>"
mail = mail&" <td><% response.Write rs("nome") %>"
mail = mail&" </td>"
mail = mail&" <td><% response.Write rs("quantidade") %>"
mail = mail&" </td>"
mail = mail&" <td><% response.Write rs("valor") %>"
mail = mail&" </td>"
mail = mail&" </tr>"
mail = mail&" <tr>"
<% rs.MoveNext
loop %>
mail = mail&" <td> </td>"
mail = mail&" <td> </td>"
mail = mail&" <td> </td>"
mail = mail&" <td> </td>"
mail = mail&" </tr>"
mail = mail&" </table></td>"
mail = mail&" </tr>"
mail = mail&" <tr>"
mail = mail&" <td height="19" bgcolor="#003466"> </td>"
mail = mail&" </tr>"
mail = mail&" </table>"
<%
strHost = "smtp.regitronic.com.br"
If Request("Send") <> "" Then
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = strHost
Mail.From = "diniz@regitronic.com.br"
Mail.FromName = "Atacado Regitronic"
Mail.AddAddress Request.form("mail")
Mail.AddCC "diniz@regitronic.com.br"
Mail.Subject = "Seu pedido no Atacado Regitronic foi Recebido"
Mail.Body = mail
Mail.Send
Response.Write "Sucesso!"
End If
%>
fica cheio de mail = mail&" a pagina
correção fiz assim agora
<!--#include file="conecta.asp"-->
<%
set rs = conexao.execute("SELECT * FROM pedidos WHERE num_pedido='"&request.QueryString("num_pedido")&"' AND cod_cliente='"&request.QueryString("cod")&"' AND vendedor='"&request.QueryString("nome")&"'")
%>
<%
mail = mail&" <style type=""text/css""> "
mail = mail&" <!--"
mail = mail&" .style2 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; }"
mail = mail&" -->"
mail = mail&" </style>"
mail = mail&" <table width=""800"" height=""529"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"">"
mail = mail&" <tr>"
mail = mail&" <td height=""135""><img src=""top.jpg"" width=""800"" height=""135"" /></td>"
mail = mail&" </tr>"
mail = mail&" <tr>"
mail = mail&" <td height=""347""><table width=""100%"" border=""1"" cellpadding=""0"" cellspacing=""0"" bordercolor=""#000000"">"
mail = mail&" <tr>"
mail = mail&" <td width=""13%""><div align=""center"" class=""style2"">CODIGO</div></td>"
mail = mail&" <td width=""59%""><div align=""center"" class=""style2"">NOME</div></td>"
mail = mail&" <td width=""17%""><div align=""center"" class=""style2"">QUANTIDADE</div></td>"
mail = mail&" <td width=""11%""><div align=""center"" class=""style2"">VALOR</div></td>"
mail = mail&" </tr>"
mail = mail&" <tr>"
mail = mail&" <td>"
do while not rs.eof
mail = mail& response.Write rs("codigo")&&"
</td>
<td>"
mail = mail& response.Write rs("nome")&&"
</td>
<td>"
mail = mail& response.Write rs("quantidade")&&"
</td>
<td>"
mail = mail& response.Write rs("valor")&&"
</td>
</tr>
<tr>"
rs.MoveNext
loop
mail = mail&" <td> </td>"
mail = mail&" <td> </td>"
mail = mail&" <td> </td>"
mail = mail&" <td> </td>"
mail = mail&" </tr>"
mail = mail&" </table></td>"
mail = mail&" </tr>"
mail = mail&" <tr>"
mail = mail&" <td height=""19"" bgcolor=""#003466""> </td>"
mail = mail&" </tr>"
mail = mail&" </table>"
%>
<%
strHost = "com.br"
If Request("Send") <> "" Then
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = strHost
Mail.From = ""
Mail.FromName = ""
Mail.AddAddress Request.form("mail")
Mail.AddAddress ""
Mail.Subject = ""
Mail.Body = mail
Mail.Send
Response.Write "Sucesso!"
End If
%>
aparece:
Tipo de erro:
Erro de compilação do Microsoft VBScript (0x800A0401)
Fim da instrução esperado
/enviamail.asp, line 26, column 51
mail = mail& response.Write rs("codigo")&&"
--------------------------------------------------^