fabio_br 0 Denunciar post Postado Novembro 23, 2006 Bom dia Estou com dificuldades de fazer um código que é enviado por email funcionar o repeat region , é um carrinho de compras, e não consigo fazer o repeat region funcionar quando tenho mais de um item o que pode estar errado neste código: 'SEND MAIL HTML = "<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN"">" & vbCrLf HTML = HTML & "<html>" HTML = HTML & "<head>" HTML = HTML & "<meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1"">" HTML = HTML & "<title>Sample NewMail</title>" HTML = HTML & "</head>" HTML = HTML & "<body>" HTML = HTML & "<p><strong>Confirme seu pedido de suas compras feitas no site: </strong></p>" HTML = HTML & "<p><a href=""http//www.catvi.com.br"">www.catvi.com.br</a></p>" HTML = HTML & "Pedido número: " & rsOrder.Fields.Item("OrderID").Value & "<br>" HTML = HTML & "Nome: " & Rscustomer.Fields.Item("nome").Value & VbTab & Rscustomer.Fields.Item("sobrenome").Value & "<br>" HTML = HTML & "Email: " & Rscustomer.Fields.Item("email").Value & "<br>" HTML = HTML & "</p><br />" HTML = HTML & "<p><strong>Endereço para entrega: </strong></p>" HTML = HTML & "Rua: " & Rscustomer.Fields.Item("endereco").Value & "<br>" HTML = HTML & "Cidade: " & Rscustomer.Fields.Item("cidade").Value & "<br>" HTML = HTML & "Estado: " & Rscustomer.Fields.Item("estado").Value & "<br>" HTML = HTML & "CEP: " & Rscustomer.Fields.Item("cep").Value & "<br>" HTML = HTML & "</p><br />" HTML = HTML & "<p><strong>Forma de pagamento:</strong> Cartão de crédito - Visa </p><br>" HTML = HTML & "<p><strong>Número da transação:</strong> " & Request("tid") & "</p>" if Instr(Request("tid"),"1001") > 0 then HTML = HTML & "<p><strong>Parcelamento da venda:</strong> Venda à crédito. </p><br>" end if if Instr(Request("tid"),"2002") > 0 then HTML = HTML & "<p><strong>Parcelamento da venda:</strong> Venda parcelada em 2 vezes. </p><br>" end if if Instr(Request("tid"),"2003") > 0 then HTML = HTML & "<p><strong>Parcelamento da venda:</strong> Venda parcelada em 3 vezes. </p><br>" end if HTML = HTML & "</p><br />" HTML = HTML & "<table width=""100%"" border=""0"" cellspacing=""1"" cellpadding=""1"">" HTML = HTML & "<tr bgcolor=""#FFFFCC"">" HTML = HTML & "<td><strong>Quantidade</strong></td>" HTML = HTML & "<td><strong>Produto</strong></td>" HTML = HTML & "<td><strong>Preço</strong></td>" HTML = HTML & "<td><strong>Total</strong></td>" HTML = HTML & "</tr>" While ((Repeat1__numRows <> 0) AND (NOT Rscustomer.EOF)) HTML = HTML & "<tr>" HTML = HTML & "<td>" HTML = HTML & Rscustomer.Fields.Item("quantidade").Value HTML = HTML & "</td>" HTML = HTML & "<td>" HTML = HTML & Rscustomer.Fields.Item("nome").Value HTML = HTML & "</td>" HTML = HTML & "<td>" HTML = HTML & FormatCurrency((Rscustomer.Fields.Item("preço").Value), -1, -2, -2, -2) HTML = HTML & "</td>" HTML = HTML & "<td>" HTML = HTML & FormatCurrency((Rscustomer.Fields.Item("Valor").Value), -1, -2, -2, -2) HTML = HTML & "</td>" HTML = HTML & "</tr>" Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 Rscustomer.MoveNext() Wend HTML = HTML & "</table>" HTML = HTML & "<p align=""right"">" & "Frete :" & FormatCurrency((numfrete), -1, -2, -2, -2) & "<br>" HTML = HTML & "SubTotal :" & FormatCurrency((numsubtotal), -1, -2, -2, -2) & "<br>" HTML = HTML & "Total :" & FormatCurrency((numvalor), -1, -2, -2, -2) & "<br>" HTML = HTML & "</p><br />" HTML = HTML & "<div align=""center""> Seu pedido foi aceito e será entregue em até 4 dias úteis.<br>" HTML = HTML & "</p><br />" HTML = HTML & "<div align=""left"">Para visitar nossa página, clique no link abaixo:<br>" HTML = HTML & "<a href=""http://www.catvi.com.br"">http://www.catvi.com.br</a><br>" HTML = HTML & "Catvi Confecções<br>" HTML = HTML & "Rua: São Leopoldo, 1050 Araçatuba - SP - Brasil.<br>" HTML = HTML & "Tel: (018) 3623-8865 e Fax: (018) 3621-2448<br>" HTML = HTML & "Email: catvi@catvi.com.br<br>" HTML = HTML & "</body>" HTML = HTML & "</html>" %> <% Set Mailer = Server.CreateObject("Persits.MailSender") Mailer.From = "catvi@catvi.com.br" Mailer.FromName = "catvi" Mailer.Host = "localhost" Mailer.AddCC "catvi@catvi.com.br", "Webmaster" Mailer.AddAddress rsemail ,rsname Mailer.Subject = "Confirmação de pedido em nosso site!" Mailer.Body = HTML Mailer.IsHTML = True On Error Resume Next Mailer.Send If Err <> 0 Then Response.Write "Ocorreu o erro: " & Err.Description End If Set Mailer = Nothing %> Compartilhar este post Link para o post Compartilhar em outros sites
Akwen 1 Denunciar post Postado Novembro 28, 2006 Putz, asp nao e o meu forte... Tem muito tempo que nao programo em asp.Mas pelo pouco que eu vi, você nao fechou o seu while!Mas posta aí o erro.Abraços. Compartilhar este post Link para o post Compartilhar em outros sites