Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Estou fazendo um sistema de envio de pedidos usando formmail...
Página pedidos.asp
Que contem o formulário
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>eumais.com.br</title><style type="text/css"><!--body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-color: #333333; background-image: url(img/bg.gif);}a:link { color: #FFFFFF; text-decoration: none;}a:visited { text-decoration: none; color: #FFFFFF;}a:hover { text-decoration: underline; color: #CCCCCC;}a:active { text-decoration: none; color: #FFFFFF;}.campos_formulario{ font-family: Tahoma, Verdana, Arial; font-size: 11px; color: #000000; background-color: #999999; border: 1px solid black; padding: 1px;}.campos_alerta{ font-family: Tahoma, Verdana, Arial; font-size: 11px; color: #000; background-color: #FBDB00; border: 1px solid black; padding: 1px;}--></style><script language="JavaScript" type="text/javascript"> function pedidos_enviar(form){ document[form].action="pedidos_enviar.asp"; document[form].submit(); }</script><script src="javascript.js"></script><link href="estilos.css" rel="stylesheet" type="text/css" /></head><body><table width="778" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><img src="img/topo.jpg" width="778" height="227" /></td> </tr> <tr> <td><!--#include file="inc_menu.asp"--></td> </tr> <tr> <td bgcolor="#383838"><table width="778" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="img/tp1.jpg" width="200" height="49" /></td> <td><img src="img/tp/pedidos.jpg" width="578" height="49" /></td> </tr> </table></td> </tr> <tr> <td bgcolor="#383838"><table width="778" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="8"> </td> <td width="179" align="left" valign="top"><table width="179" border="0" cellspacing="0" cellpadding="0"> <tr> <td><a href="moda.asp"><img src="img/fab.jpg" width="179" height="88" border="0" /></a></td> </tr> </table></td> <td width="591" align="left" valign="top"> <table width="591" border="0" cellspacing="20" cellpadding="0"> <form action="pedidos.asp#total" name="pedidos" method="post" onSubmit="return verifica_form(this);"> <tr> <td width="551"><p align="justify" class="coluna11"><strong>Preencha corretamente todos os campos para enviar um pedido prévio.</strong></p> <p align="justify" class="coluna11">Entraremos em contato para finalização do processo.</p> <p align="justify" class="moda10"><strong>Clique na referência para ver a foto da peça.</strong></p> <p align="justify" class="moda10"> </p> <table width="551" border="0" cellspacing="0" cellpadding="10"> <tr> <td width="551" bgcolor="#232323"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><p class="titulo"><strong> Dados da Empresa </strong></p></td> </tr> <tr> <td><img src="img/sp.gif" width="5" height="5" /></td> </tr> <tr> <td><table width="531" border="0" cellpadding="5" cellspacing="1" bgcolor="#000000"> <tr class="coluna11"> <td width="103" align="left" bgcolor="#383838">Razão Social </td> <td width="405" align="left" bgcolor="#383838"><input name="razao_social" value="<%=Request.Form("razao_social")%>" type="text" class="campos_formulario" size="70" maxlength="250" df_verificar="sim" /> *</td> </tr> <tr class="coluna11"> <td align="left" bgcolor="#383838">CNPJ</td> <td align="left" bgcolor="#383838"><input name="cnpj" value="<%=Request.Form("cnpj")%>" type="text" class="campos_formulario" size="30" maxlength="20"/></td> </tr> <tr class="coluna11"> <td align="left" bgcolor="#383838">Endereço</td> <td align="left" bgcolor="#383838"><input name="endereco" value="<%=Request.Form("endereco")%>" type="text" class="campos_formulario" size="55" maxlength="150" df_verificar="sim" onkeypress="desabilita_cor(this)" /> *</td> </tr> <tr class="coluna11"> <td align="left" bgcolor="#383838">Cidade - Estado </td> <td align="left" bgcolor="#383838"><input name="cidade_estado" value="<%=Request.Form("cidade_estado")%>" type="text" class="campos_formulario" size="55" maxlength="150" df_verificar="sim" onkeypress="desabilita_cor(this)" /> *</td> </tr> <tr class="coluna11"> <td align="left" bgcolor="#383838">Telefone</td> <td align="left" bgcolor="#383838"><input name="telefone" value="<%=Request.Form("telefone")%>" type="text" class="campos_formulario" size="30" maxlength="30" df_verificar="sim" onkeypress="desabilita_cor(this)" /> *</td> </tr> <tr class="coluna11"> <td align="left" bgcolor="#383838">E-mail</td> <td align="left" bgcolor="#383838"><input name="email" value="<%=Request.Form("email")%>" type="text" class="campos_formulario" size="55" maxlength="30" df_verificar="sim" df_validar="email" onkeypress="desabilita_cor(this)" /> *</td> </tr> <tr class="coluna11"> <td align="left" bgcolor="#383838">Responsável</td> <td align="left" bgcolor="#383838"><input name="responsavel" value="<%=Request.Form("responsavel")%>" type="text" class="campos_formulario" size="30" maxlength="50" df_verificar="sim" onkeypress="desabilita_cor(this)" /> *</td> </tr> </table></td> </tr> </table></td> </tr> </table> <p align="justify" class="moda10"> </p> <table width="551" border="0" cellspacing="0" cellpadding="10"> <tr> <td width="551" bgcolor="#232323"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><p class="titulo"><strong> Moda Masculina</strong></p></td> </tr> <tr> <td><img src="img/sp.gif" width="5" height="5" /></td> </tr> <tr> <td><table width="531" border="0" cellpadding="3" cellspacing="1" bgcolor="#000000"> <tr class="moda10"> <td align="center" bgcolor="#232323"> </td> <td colspan="6" bgcolor="#232323"><strong>Digite o total de peças em cada tamanho. </strong></td> <td align="center" bgcolor="#232323"> </td> </tr> <tr class="credito11marela"> <td width="60" align="center" bgcolor="#333333">Ref.</td> <td width="53" align="center" bgcolor="#333333">36</td> <td width="53" align="center" bgcolor="#333333">38</td> <td width="53" align="center" bgcolor="#333333">40</td> <td width="53" align="center" bgcolor="#333333">42</td> <td width="53" align="center" bgcolor="#333333">44</td> <td width="53" align="center" bgcolor="#333333">46</td> <td width="96" align="center" bgcolor="#333333">Sub-Total</td> </tr> <tr class="moda10"> <% if Request("p5008_36") <> "" then p5008_36 = Request("p5008_36") else p5008_36 = 0 end if if Request("p5008_38") <> "" then p5008_38 = Request("p5008_38") else p5008_38 = 0 end if if Request("p5008_40") <> "" then p5008_40 = Request("p5008_40") else p5008_40 = 0 end if if Request("p5008_42") <> "" then p5008_42 = Request("p5008_42") else p5008_42 = 0 end if if Request("p5008_44") <> "" then p5008_44 = Request("p5008_44") else p5008_44 = 0 end if if Request("p5008_46") <> "" then p5008_46 = Request("p5008_46") else p5008_46 = 0 end if subtotal_5008 = int(p5008_36) + int(p5008_38) + int(p5008_40) + int(p5008_42) + int(p5008_44) + int(p5008_46) %> <td align="center" bgcolor="#383838">5008</td> <td align="center" bgcolor="#383838"><input name="p5008_36" value="<%=Request("p5008_36")%>" type="text" class="campos_formulario" size="3" maxlength="3" verificar_numerico="sim" onKeyPress="desabilita_cor(this)" /></td> <td align="center" bgcolor="#383838"><input name="p5008_38" value="<%=Request("p5008_38")%>" type="text" class="campos_formulario" size="3" maxlength="3" verificar_numerico="sim" onKeyPress="desabilita_cor(this)" /></td> <td align="center" bgcolor="#383838"><input name="p5008_40" value="<%=Request("p5008_40")%>" type="text" class="campos_formulario" size="3" maxlength="3" verificar_numerico="sim" onKeyPress="desabilita_cor(this)" /></td> <td align="center" bgcolor="#383838"><input name="p5008_42" value="<%=Request("p5008_42")%>" type="text" class="campos_formulario" size="3" maxlength="3" verificar_numerico="sim" onKeyPress="desabilita_cor(this)" /></td> <td align="center" bgcolor="#383838"><input name="p5008_44" value="<%=Request("p5008_44")%>" type="text" class="campos_formulario" size="3" maxlength="3" verificar_numerico="sim" onKeyPress="desabilita_cor(this)" /></td> <td align="center" bgcolor="#383838"><input name="p5008_46" value="<%=Request("p5008_46")%>" type="text" class="campos_formulario" size="3" maxlength="3" verificar_numerico="sim" onKeyPress="desabilita_cor(this)" /></td> <td align="center" bgcolor="#383838"><%=subtotal_5008%></td> </tr> <tr class="moda10"> <% if Request("p5011_36") <> "" then p5011_36 = Request("p5011_36") else p5011_36 = 0 end if if Request("p5011_38") <> "" then p5011_38 = Request("p5011_38") else p5011_38 = 0 end if if Request("p5011_40") <> "" then p5011_40 = Request("p5011_40") else p5011_40 = 0 end if if Request("p5011_42") <> "" then p5011_42 = Request("p5011_42") else p5011_42 = 0 end if if Request("p5011_44") <> "" then p5011_44 = Request("p5011_44") else p5011_44 = 0 end if if Request("p5011_46") <> "" then p5011_46 = Request("p5011_46") else p5011_46 = 0 end if subtotal_5011 = int(p5011_36) + int(p5011_38) + int(p5011_40) + int(p5011_42) + int(p5011_44) + int(p5011_46) %> <td align="center" bgcolor="#383838">5011</td> <td align="center" bgcolor="#383838"><input name="p5011_36" value="<%=Request("p5011_36")%>" type="text" class="campos_formulario" size="3" maxlength="3" verificar_numerico="sim" onKeyPress="desabilita_cor(this)" /></td> <td align="center" bgcolor="#383838"><input name="p5011_38" value="<%=Request("p5011_38")%>" type="text" class="campos_formulario" size="3" maxlength="3" verificar_numerico="sim" onKeyPress="desabilita_cor(this)" /></td> <td align="center" bgcolor="#383838"><input name="p5011_40" value="<%=Request("p5011_40")%>" type="text" class="campos_formulario" size="3" maxlength="3" verificar_numerico="sim" onKeyPress="desabilita_cor(this)" /></td> <td align="center" bgcolor="#383838"><input name="p5011_42" value="<%=Request("p5011_42")%>" type="text" class="campos_formulario" size="3" maxlength="3" verificar_numerico="sim" onKeyPress="desabilita_cor(this)" /></td> <td align="center" bgcolor="#383838"><input name="p5011_44" value="<%=Request("p5011_44")%>" type="text" class="campos_formulario" size="3" maxlength="3" verificar_numerico="sim" onKeyPress="desabilita_cor(this)" /></td> <td align="center" bgcolor="#383838"><input name="p5011_46" value="<%=Request("p5011_46")%>" type="text" class="campos_formulario" size="3" maxlength="3" verificar_numerico="sim" onKeyPress="desabilita_cor(this)" /></td> <td align="center" bgcolor="#383838"><%=subtotal_5011%></td> </tr> </table> </td> </tr> <tr> <td><img src="img/sp.gif" width="8" height="8" /></td> </tr> <tr> <td><p class="titulo"><strong> Moda Feminina </strong></p></td> </tr> <tr> <td><img src="img/sp.gif" width="5" height="5" /></td> </tr> <tr> <td> <table width="531" border="0" cellpadding="3" cellspacing="1" bgcolor="#000000"> <tr class="credito11marela"> <td width="60" align="center" bgcolor="#333333">Ref.</td> <td width="53" align="center" bgcolor="#333333">34</td> <td width="53" align="center" bgcolor="#333333">36</td> <td width="53" align="center" bgcolor="#333333">38</td> <td width="53" align="center" bgcolor="#333333">40</td> <td width="53" align="center" bgcolor="#333333">42</td> <td width="53" align="center" bgcolor="#333333">44</td> <td width="96" align="center" bgcolor="#333333">Sub-Total</td> </tr> <tr class="moda10"> <td align="center" bgcolor="#383838">5000</td> <% if Request("p5000_36") <> "" then p5000_36 = Request("p5000_36") else p5000_36 = 0 end if if Request("p5000_38") <> "" then p5000_38 = Request("p5000_38") else p5000_38 = 0 end if if Request("p5000_40") <> "" then p5000_40 = Request("p5000_40") else p5000_40 = 0 end if if Request("p5000_42") <> "" then p5000_42 = Request("p5000_42") else p5000_42 = 0 end if if Request("p5000_44") <> "" then p5000_44 = Request("p5000_44") else p5000_44 = 0 end if if Request("p5000_46") <> "" then p5000_46 = Request("p5000_46") else p5000_46 = 0 end if subtotal_5000 = int(p5000_36) + int(p5000_38) + int(p5000_40) + int(p5000_42) + int(p5000_44) + int(p5000_46) %> <td align="center" bgcolor="#383838"><input name="p5000_36" value="<%=Request("p5000_36")%>" type="text" class="campos_formulario" size="3" maxlength="3" verificar_numerico="sim" onKeyPress="desabilita_cor(this)" /></td> <td align="center" bgcolor="#383838"><input name="p5000_38" value="<%=Request("p5000_38")%>" type="text" class="campos_formulario" size="3" maxlength="3" verificar_numerico="sim" onKeyPress="desabilita_cor(this)" /></td> <td align="center" bgcolor="#383838"><input name="p5000_40" value="<%=Request("p5000_40")%>" type="text" class="campos_formulario" size="3" maxlength="3" verificar_numerico="sim" onKeyPress="desabilita_cor(this)" /></td> <td align="center" bgcolor="#383838"><input name="p5000_42" value="<%=Request("p5000_42")%>" type="text" class="campos_formulario" size="3" maxlength="3" verificar_numerico="sim" onKeyPress="desabilita_cor(this)" /></td> <td align="center" bgcolor="#383838"><input name="p5000_44" value="<%=Request("p5000_44")%>" type="text" class="campos_formulario" size="3" maxlength="3" verificar_numerico="sim" onKeyPress="desabilita_cor(this)" /></td> <td align="center" bgcolor="#383838"><input name="p5000_46" value="<%=Request("p5000_46")%>" type="text" class="campos_formulario" size="3" maxlength="3" verificar_numerico="sim" onKeyPress="desabilita_cor(this)" /></td> <td align="center" bgcolor="#383838"><%=subtotal_5000%></td> </tr> </table> </td> </tr> <tr><td height="20"></td></tr> <tr> <td> <table width="104" border="0" align="right" cellpadding="6" cellspacing="1" bgcolor="#000000"> <% total = subtotal_5008 + subtotal_5011 + subtotal_5000 %> <tr class="credito11marela"> <td width="96" align="center" bgcolor="#333333">Total Peças </td> </tr> <tr class="coluna11"> <td align="center" bgcolor="#383838"><strong><%=total%></strong><a name="total"></a></td> </tr> </table> </td> </tr> <tr> <td><img src="img/sp.gif" width="8" height="8" /></td> </tr> <tr> <td align="right"><input name="Submit" type="submit" class="campos_formulario" value="Recalcular Unidades"> <input name="Submit" type="button" onClick="java script: pedidos_enviar('pedidos')" class="campos_formulario" value="Enviar Pedido" <%if total = 0 then%>disabled="disabled"<%end if%> /></td> </tr> </table> </td> </tr> </table> <p align="justify" class="coluna11"> </p> <p align="justify" class="amarelo10"><img src="img/line.gif" width="551" height="20" /></p> <p align="justify" class="coluna11"> </p> <p align="justify" class="coluna11"><a href="java script:window.history.go(-1)"><img src="img/back.gif" width="47" height="9" border="0" /></a></p></td> </tr> </form> </table></td> </tr> </table></td> </tr> <tr> <td><!--#include file="inc_credito.asp"--></td> </tr></table></body></html>
Página que envia o pedido
<% produtos = "" If Request("p5008_36") <> "" Then produtos = produtos & " Referência: 5008, Tamanho: 36, Unidades: " & Request.Form("p5008_36") End If If Request("p5008_38") <> "" Then produtos = produtos & "<br>Referência: 5008, Tamanho: 38, Unidades: " & Request.Form("p5008_38") End If If Request("p5008_40") <> "" Then produtos = produtos & "<br>Referência: 5008, Tamanho: 40, Unidades: " & Request.Form("p5008_40") End If If Request("p5008_42") <> "" Then produtos = produtos & "<br>Referência: 5008, Tamanho: 42, Unidades: " & Request.Form("p5008_42") End If If Request("p5008_44") <> "" Then produtos = produtos & "<br>Referência: 5008, Tamanho: 44, Unidades: " & Request.Form("p5008_44") End If If Request("p5008_46") <> "" Then produtos = produtos & "<br>Referência: 5008, Tamanho: 46, Unidades: " & Request.Form("p5008_46") End If If Request("p5011_36") <> "" Then produtos = produtos & "<br><br>Referência: 5011, Tamanho: 36, Unidades: " & Request.Form("p5011_36") End If If Request("p5011_38") <> "" Then produtos = produtos & "<br>Referência: 5011, Tamanho: 38, Unidades: " & Request.Form("p5011_38") End If If Request("p5011_40") <> "" Then produtos = produtos & "<br>Referência: 5011, Tamanho: 40, Unidades: " & Request.Form("p5011_40") End If If Request("p5011_42") <> "" Then produtos = produtos & "<br>Referência: 5011, Tamanho: 42, Unidades: " & Request.Form("p5011_42") End If If Request("p5011_44") <> "" Then produtos = produtos & "<br>Referência: 5011, Tamanho: 44, Unidades: " & Request.Form("p5011_44") End If If Request("p5011_46") <> "" Then produtos = produtos & "<br>Referência: 5011, Tamanho: 46, Unidades: " & Request.Form("p5011_46") End If If Request("p5000_36") <> "" Then produtos = produtos & "<br><br>Referência: 5000, Tamanho: 36, Unidades: " & Request.Form("p5000_36") End If If Request("p5000_38") <> "" Then produtos = produtos & "<br>Referência: 5000, Tamanho: 38, Unidades: " & Request.Form("p5000_38") End If If Request("p5000_40") <> "" Then produtos = produtos & "<br>Referência: 5000, Tamanho: 40, Unidades: " & Request.Form("p5000_40") End If If Request("p5000_42") <> "" Then produtos = produtos & "<br>Referência: 5000, Tamanho: 42, Unidades: " & Request.Form("p5000_42") End If If Request("p5000_44") <> "" Then produtos = produtos & "<br>Referência: 5000, Tamanho: 44, Unidades: " & Request.Form("p5000_44") End If If Request("p5000_46") <> "" Then produtos = produtos & "<br>Referência: 5000, Tamanho: 46, Unidades: " & Request.Form("p5000_46") End If Set Mail = Server.CreateObject("Persits.MailSender") Mail.FromName = Request.form("responsavel") Mail.From = Request.form("email") Mail.Host = "mail.eumais.com.br" Mail.Username = "pedido@eumais.com.br" Mail.Password = "senha" destinatario = "pedido@eumais.com.br" Mail.AddAddress destinatario Mail.Subject = "PEDIDO - eumais.com.br" body = body & "<HTML><HEAD>" body = body & "<META content='text/html; charset=iso-8859-1' http-equiv=Content-Type>" body = body & "<BODY><FONT face=Arial size=2>" body = body & "<STRONG>PEDIDO ENVIADO PELO WEBSITE (www.eumais.com.br)</STRONG>" body = body & "<BR><BR>" body = body & "<BR><B>Razão Social:</B> " & Request.Form("razao_social") & vb script:window.history.go(-1)"><img src="img/back.gif" width="47" height="9" border="0" /></a></p></td> </tr> </form> </table></td> </tr> </table></td> </tr> <tr> <td><!--#include file="inc_credito.asp"--></td> </tr></table></body></html>
Só que quando mando pra enviar, aparece o erro:
Ocorreu um erro: 551 Sender address is not valid for your login. Check your email program settings.
Mas a senha está correta e o email também, alguem pode me ajudar????
Carregando comentários...