Ir para conteúdo
Fórum Script Brasil

Roseane

Membros
  • Total de itens

    10
  • Registro em

  • Última visita

Tudo que Roseane postou

  1. Hum... ok, entendi! Obrigada, Rafael. ^.^ Abraços, Roseane
  2. Bom galera, olha a iniciante de ASP aqui de novo!!! :D Ms agora é simples. A questão é: Fiz um script para aqles formularios básicos: INDIQUE À UM AMIGO. Ms a mensagem chega no email como spam, quando vai para yahoo, gmail, hot... dai vem a dúvida: Onde e o que eu mudo no script para que isso não acotneça?? :huh: Se alguém puder me ajudar, agradeço!! <% str_nome = trim(request.form("nome")) str_remetente = trim(request.form("remetente")) str_destinatario = trim(request.form("destinatario")) str_assunto = "Indicação de site" endereco = request.form("pagina") str_mensagem = trim(request.form("mensagem")) & "<br><br>Site:<a href = " & endereco & ">" & endereco & "</a>" set mensagem = server.createobject("CDONTS.NewMail") mensagem.from = str_remetente mensagem.to = str_destinatario mensagem.Subject = str_assunto mensagem.bodyformat = 0 mensagem.mailformat = 0 mensagem.Body = str_mensagem mensagem.Send response.write "<b> Dados da mensagem </b>" response.write "<br><i> Remetente: </i> " & str_nome & " - " & str_remetente response.write " <br><i> Destinatário: </i> " & str_destinatario response.write "<br><i> Assunto: </i> " & str_assunto response.write "<br><i> Mensagem: </i> " & str_mensagem response.write "<br><h2> Mensagem enviada com sucesso</h2>" response.write "<br><strong><a href=" & endereco & "> Clique aqui para voltar! </a></strong>" %>
  3. Roseane

    Guitar Hero

    lol.. Daora! Adoro Guittar Hero.. é agora q a tendinite ataca...kkkkkkkkk
  4. Deu certooooooOOOO..brigaaaaaaada, Rafael.. Jr. vlw a força, ms meu servidor de hospedagem, só Jesus, foi dificil ms achei um script q ele aceite!!!...rsrsrs Ufa.. agora é terminar o restante do trabalho!!! Um FELIZ ANO NOVO à vocês!!! Tudo de bom, muitos trabalhos e q todos redam muito, tanto em conhecimento quanto em R$..rsrsrs BjãoOOO ;)
  5. Fiz assim e agora só recebo o campo mensagem.. lol... lesada pá ca...rsrsrs <% Function SendMail(From,Rcpt,Subject,Body) Trim(From) Trim(Rcpt) If Len(From) < 1 Then ReportError strError & "<br>Não responder esse email" End If If Len(Rcpt) < 1 Then ReportError strError & "<br>Sem destinatário para o email" End If IsValidEmail Rcpt IsValidEmail From Set objMailer = CreateObject("CDONTS.Newmail") objMailer.From = From objMailer.To = Rcpt objMailer.Subject = Subject objMailer.Body = "Nome....... " & request.form("nome") & vbcrlf objMailer.Body = "E-mail..... " & request.form("email") & vbcrlf objMailer.Body = "Cidade..... " & request.form("cidade") & vbcrlf objMailer.Body = "Estado..... " & request.form("estado") & vbcrlf objMailer.Body = "Telefone... " & request.form("telefone") & vbcrlf objMailer.Body = "Assunto.... " & request.form("assunto") & vbcrlf objMailer.Body = "Mensagem... " & request.form("mensagem") & vbcrlf objMailer.Send Set objMailer = Nothing End Function %>
  6. É aí que tá o problema. Desculpe a ignorância, ms onde exatamente eu posso substituir a variavel TGorder. q é o que compõe o corpo da mensagem? porque eu tentei em todos do script e deu erro...=/ Essa variável é opcional, ms se eu a retiro, como o script depende dela, n funciona, dai n sei exatamente onde posso fazerr a substituição... Esse é o trecho da função de envio de email <% Function SendMail(From,Rcpt,Subject,Body) Trim(From) Trim(Rcpt) If Len(From) < 1 Then ReportError strError & "<br>Não responder esse email" End If If Len(Rcpt) < 1 Then ReportError strError & "<br>Sem destinatário para o email" End If IsValidEmail Rcpt IsValidEmail From Set objMailer = CreateObject("CDONTS.Newmail") objMailer.From = From objMailer.To = Rcpt objMailer.Subject = Subject objMailer.Body = Body objMailer.Send Set objMailer = Nothing End Function %> Esse outro pedaço que contém a função com a variavel TGorder <% Function SeqForm() Dim Temp,strTmp,strOrder,strOut If objFM.Exists("TGorder") = False Then Exit Function ElseIf isEmpty(objFM.Item("TGorder")) Then Exit Function End If strOrder = objFM.Item("TGorder") Temp = Split(strOrder,",",-1,1) For Each strTmp in Temp If objFM.Exists(strTmp) Then strOut = strOut & strTmp & "=" & objFM.Item(strTmp) & Chr(10) End If Next SeqForm = strOut End Function %> E no form essa mesma TGorder fica assim <!--TGorder: Ordem das informacoes--> <input type="hidden" name="TGorder" value="nome,email,telefone,cidade,estado,assunto,mensagem,">
  7. Obrigada pessoal. Desisti desse script e fiz um outro, tb porque o cliente pediu para os campos NOME E EMAIL serem obrigatorios.. FUNCIONOUUU!! lol ..rsrs Porém, na hr que recebo o email ele vem assim: nome=roseaneemail=roseane.designer@terra.com.brcidade=SãoPaulo estado=SPtelefone=xx-xxxx-xxxxassunto=Testemensagem=Teste Tá td colaaaaaaado.. =/ Como eu faço pra vir arrumadinho, assim: Nome:Roseane Email: email@servidor.com.br Cidade: Sampa Estado: SP Telefone:xx-xxxx-xxxx Assunto: Teste Mensagem: Teste Segue o código abaixo: <%@language = "VBscript"%> <% Dim strError Response.Buffer = True If ScriptEngineMajorVersion < 2 Then ReportError "Host system needs scripting engine upgrade to use this script" End If Set objFM = CreateObject("Scripting.Dictionary") If IsObject(objFM) = False Then ReportError "Host system lacks component(s) required by this script" End If Set objMailx = CreateObject("CDONTS.Newmail") If IsObject(objMailx) = False Then ReportError "Host system lacks component(s) required by this script" End If Set objMailx = Nothing %> <%variaveis%> <% strRcpt = "email@dominio.com.br" 'Endereço que vai receber o formulario strFromVar = "email" 'Email de resposta strDefFrom = "email@dominio.com.br" 'Email padrão strDefSubject = "Contato pelo site " 'Assunto do email strRedirect = "obrigado.html" 'Página de agradecimeno %> <%'variables you can set end here%> <% ParseForm CheckForm If Len(strError) > 0 Then ReportError strError End If strOutX = SeqForm If Len(strOutX) < 1 Then strOutX = FormToString End If If Len(strOutX) < 1 Then ReportError "Submitted form is empty" End If strSubject = strDefSubject If objFM.Exists("TGsubject") Then strSubject = objFM.Item("TGsubject") End If strFrom = strDefFrom If Len(strFromVar) > 0 Then If objFM.Exists(strFromVar) Then strFrom = objFM.Item(strFromVar) End If End If SendMail strFrom,strRcpt,strSubject,strOutX If Len(strRedirect) > 0 Then Response.redirect(strRedirect) Response.End End If If objFM.Exists("TGredirect") = True Then If Len(objFM.Item("TGredirect")) > 0 Then Response.redirect(objFM.Item("TGredirect")) Response.End End If End If %> <% Credit Response.End %> <% Function IsValidEmail(Email) Dim Temp,Temp2 strNotValid = "<br>Endereço de email inválido" strTooLong = "<br>Endereço de email muito extenso" If Len(Email) > 100 Then ReportError strTooLong End If Email = LCase(Email) Temp = Split(Email,"@",2,1) If UBound(Temp) < 1 Then ReportError strNotValid End If Temp2 = Split(Temp(1),".",-1,1) If UBound(Temp2) < 1 Then ReportError strNotValid End If End Function %> <% Function SendMail(From,Rcpt,Subject,Body) Trim(From) Trim(Rcpt) If Len(From) < 1 Then ReportError strError & "<br>Não responder esse email" End If If Len(Rcpt) < 1 Then ReportError strError & "<br>Sem destinatário para o email" End If IsValidEmail Rcpt IsValidEmail From Set objMailer = CreateObject("CDONTS.Newmail") objMailer.From = From objMailer.To = Rcpt objMailer.Subject = Subject objMailer.Body = Body objMailer.Send Set objMailer = Nothing End Function %> <% Function CheckForm() Dim Temp,strTmp,strForce strInputReq = "<br>É necessário o preenchimento do " If objFM.Exists("TGrequire") = False Then Exit Function ElseIf isEmpty(objFM.Item("TGrequire")) Then Exit Function End If strForce = objFM.Item("TGrequire") Temp = Split(strForce,",",-1,1) For Each strTmp in Temp If objFM.Exists(strTmp) = False Then strError = strError & strInputReq & strTmp ElseIf Len(objFM.Item(strTmp)) < 1 Then strError = strError & strInputReq & strTmp End If Next End Function %> <% Function ParseForm() For Each Item in Request.Form If objFM.Exists(Item) Then objFM.Item(Item) = objFM.Item(Item) & "," & Request.QueryString(Item) Else objFM.Add Item,Request.Form(Item) End If Next For Each Item in Request.QueryString If objFM.Exists(Item) Then objFM.Item(Item) = objFM.Item(Item) & "," & Request.QueryString(Item) Else objFM.Add Item,Request.QueryString(Item) End If Next End Function %> <% Function SeqForm() Dim Temp,strTmp,strOrder,strOut If objFM.Exists("TGorder") = False Then Exit Function ElseIf isEmpty(objFM.Item("TGorder")) Then Exit Function End If strOrder = objFM.Item("TGorder") Temp = Split(strOrder,",",-1,1) For Each strTmp in Temp If objFM.Exists(strTmp) Then strOut = strOut & strTmp & "=" & objFM.Item(strTmp) & Chr(10) End If Next SeqForm = strOut End Function %> <% Function FormToString() Dim strOut strKeys = objFM.Keys strValues = objFM.Items For intCnt = 0 To objFM.Count -1 strOut = strOut & strKeys(intCnt) & "=" & strValues(intCnt) & Chr(10) Next FormToString = strOut End Function %> <% Function ReportError(strMess) If Len(strMess) < 1 Then strMess = strError End If strErr = "Ocorreram os seguintes erros<br>" & strMess Response.Clear %> <h1>Ocorreu um erro!</h1> <%'Mesangem de erro%> <% Response.Write(strErr) %> <p> <b>Clique em <i><a href="index.html">Voltar</a></i> e corrija as entradas</b> </p> <% Credit Response.End End Function %> <%Function Credit%> <p align=center> <font face="Arial,Helvetica" size=1> Assinatura </p> <%End Function%> E assim está no form: <form action="aspmailer.asp" method="POST"> <!--TGrequire: Campos obrigatorios--> <input type="hidden" name="TGrequire" value="nome,email"> <!--TGorder: Ordem das informacoes--> <input type="hidden" name="TGorder" value="nome,email,telefone,cidade,estado,assunto,mensagem,"> <!--TGsubject: Assunto do email--> <input type="hidden" name="TGsubject" value="Contato pelo site"> <!--TGredirect: URL de agradecimento--> <input type="hidden" name="TGredirect" value="obrigado.html"> Bom é isso aí! To enchendo o saco de vocês, né?? =D Brigadão mesmo, é q eu n desisto nunca, por isso vou ficar cutucando até dar certo..rsrsrs
  8. 554 5.5.1 Error: no valid recipients Esse é o erro que aparece!!!! <_<
  9. É, não deu certo mesmo o script que ele passou. Então, como eu devo colocar? O email para qual qro q o formulário seja enviado é 'contato@dominio.com.br'. O servidor comporta ASPMAIL porém a unica "exigencia" é qo FROM seje um email do domínio. já corrigi isso, ms ainda assim n funciona o MAILER.ADDRECIPIENT Obrigada pela atenção!!!
  10. então, aí que tá, tb n sei ql o erro, ms testarei esse que me mandou. Obrigada!!!
  11. Por favor, criei um script em ASP para enviar os dados de um formulário por email, porém, quando clico em ENVIAR aparece esse erro de destinatário inválido: 554 5.5.1 Error: no valid recipients :blink: Segue o script abaixo: Será q alguém poderia me ajudar, por favor? <% Set Mailer = Server.CreateObject("SMTPsvg.Mailer") Mailer.FromName = request.form("nome") Mailer.FromAddress = request.form("email") Mailer.RemoteHost = "smtp.dominio.com.br" Mailer.AddRecipient "contato","contato@dominio.com.br" Mailer.ContentType = "text/html" Mailer.Subject = "Contato pelo site" Mailer.BodyText = "Nome........... " & request.form("nome") & vbcrlf Mailer.BodyText = "E-mail......... " & request.form("email") & vbcrlf Mailer.BodyText = "Cidade......... " & request.form("cidade") & vbcrlf Mailer.BodyText = "Estado......... " & request.form("estado") & vbcrlf Mailer.BodyText = "Telefone......... " & request.form("telefone") & vbcrlf Mailer.BodyText = "Assunto......... " & request.form("assunto") & vbcrlf Mailer.BodyText = "Mensagem........ " & request.form("mensagem") & vbcrlf if Mailer.SendMail then Response.redirect "obrigado.html" else Response.Write mailer.response end if %> Obrigada
×
×
  • Criar Novo...