Ir para conteúdo
Fórum Script Brasil
  • 0

(Resolvido) Envio de formulário por email


danyllo.franco

Pergunta

:wacko:

Bom dia galera !

Preciso muito da ajuda de vocês. Estou criando um formulário para envio de mensagens diretamente para um endereço de email.

Utilizo o código do CarlTom Form Mail, mas altero os dados necessário para meu servidor e nada acontece, o formulário funciona corretamente, mas não recebo a mensagem em meu email pessoal...........podem me ajudar ????

Abs,

Danyllo

Link para o comentário
Compartilhar em outros sites

6 respostass a esta questão

Posts Recomendados

  • 0

Peraí... vamos por partes...

Seu site está hospedado em um servidor externo (esses de hospedagem) ou um servidor próprio (localhost)?

você só tem esse componente disponível? Está certo disso?

Ele está devidamente instalado? e configurado?

Aparece alguma mensagem de erro?

Link para o comentário
Compartilhar em outros sites

  • 0

Os Componentes que tenho instalados são :

ADODB

FileSystemObject

ASPMail

Persits Upload

Pretenso usar o Aspmail (já instalado). Configurei o arquivo ASPMAIL.asp (Fiz download do ASPMAIL 4):

<html>
<head><title>ASP Mailer Test</title><head>
<body>
<H3>ASP Mailer Test</H3>
<%

  rem ------------------------------------
  rem - Instantiate the SMTP mailer object
  rem ------------------------------------
  Set Mailer = Server.CreateObject("SMTPsvg.Mailer")


  rem ------------------------------------
  rem - Get the internal version number
  rem ------------------------------------
  rem strVer = Mailer.Version

  rem ------------------------------------
  rem - Set the FromName and FromAddress
  rem - WARNING: These are REQUIRED FIELDS
  rem ------------------------------------
  Mailer.FromName = "Danyllo"
  Mailer.FromAddress = "danyllo.franco@gmail.com.br"

  rem ------------------------------------
  rem - Set the Remote Host (SMTP) Host
  rem -   that we'll send this mail thru
  rem ------------------------------------
  strMailHost = "smtp"
  if strMailHost = "smtp.ggg.com.br" then
    Response.Write "<h2 align=center>Error: You need to change the mailhost to your SMTP server address</h2>"
  end if
  Mailer.RemoteHost = strMailHost

  rem ------------------------------------
  rem - Set the recipient's address
  rem -   that this message will go to
  rem ------------------------------------
  Mailer.AddRecipient "Danyllo", "danyllo.franco@gmail.com.br"

  rem ------------------------------------
  rem - Set the Carbon Copy addresses
  rem ------------------------------------
  rem Mailer.AddCC "Danyllo", "danyllo.franco@gmail.com.br"

  rem ------------------------------------
  rem - Set the Blind Carbon Copy addresses
  rem ------------------------------------
  rem Mailer.AddBCC "Danyllo", "danyllo.franco@gmail.com.br"

  rem ------------------------------------
  rem - Set the ReturnReceipt flag
  rem -   If this is set to true AND the
  rem -   recipients SMTP server supports
  rem -   this feature (and it is enabled)
  rem -   the recipients SMTP server will
  rem -   send a notice back to the FromAddress
  rem -   confirming that this email has been
  rem -   delivered.
  rem ------------------------------------
  Mailer.ReturnReceipt = false

  rem ------------------------------------
  rem - Set the ConfirmReading flag
  rem -   If this is set to true AND the
  rem -   recipients email program supports
  rem -   this feature (and it is enabled)
  rem -   the recipients email program will
  rem -   send a notice back to the FromAddress
  rem -   confirming that this email has been 
  rem -   read.
  rem ------------------------------------
  Mailer.ConfirmRead = false

  rem ------------------------------------
  rem - Set the subject line
  rem ------------------------------------
  Mailer.Subject = "Teste"

  rem ------------------------------------
  rem - Set the message body text
  rem -
  rem - To optionally clear the text once
  rem - you have set it use the ClearBodyText
  rem - method (e.g. Mailer.ClearBodyText
  rem ------------------------------------
  strBody = "Olá" & Chr(13) & Chr(10) & Chr(13) & Chr(10)
  strBody = strBody & "Isso é um teste "
  strBody = strBody & "não liguem" & Chr(13) & Chr(10) & Chr(13) & Chr(10)
  strBody = strBody & "é verdade" & Chr(13) & Chr(10) & Chr(13) & Chr(10)
  strBody = strBody & "Tá bom (" & Now & ")"
  Mailer.BodyText = strBody


  rem ------------------------------------
  rem - Clear the attachments and add a
  rem -  couple of files. Make sure that
  rem -  the IUSR_XYZ IIS user has security
  rem -  rights that allow the component
  rem -  to read the necessary files!
  rem -  (optional)
  rem - Attachments are not supported in 
  rem -  the eval version
  rem ------------------------------------
  rem Mailer.ClearAttachments
  rem Mailer.AddAttachment "c:autoexec.bat"
  rem Mailer.AddAttachment "c:config.sys"

  rem ------------------------------------
  rem - Set the encoding type (default is MIME)
  rem -   1 = UUEncoded
  rem -   2 = MIME
  rem - (optional)
  rem ------------------------------------
  rem Mailer.Encoding = 2

  rem ------------------------------------
  rem - If you need to debug the session
  rem -  give a log file name here. Make
  rem -  sure the IUSR_XYZ IIS user has
  rem -  security that allows the component
  rem -  to write to this file
  rem -  (optional)
  rem - 
  rem - *** WARNING *** *** WARNING *** 
  rem - do not use this setting in situations
  rem - where multiple users can acess this
  rem - component at the same time. This is
  rem - for single user debugging ONLY!
  rem - *** WARNING *** *** WARNING *** 
  rem ------------------------------------
  rem Mailer.SMTPLog = "c:smtp.log"

  rem ------------------------------------
  rem - Set priority and if message is
  rem -  urgent. Prioritys are 1, 3, 5 and
  rem -  are reflected in the X-Priority
  rem -  header
  rem - 1 = High, 3 = Normal, 5 = Low
  rem -  (optional)
  rem ------------------------------------
  rem Mailer.Priority = 1
  rem Mailer.Urgent = false

  rem ------------------------------------
  rem - Set the character set
  rem -  By default the char set is US Ascii
  rem -  
  rem -  Valid values:
  rem -  1 = US Ascii
  rem -  2 = ISO-8859-1
  rem ------------------------------------
  rem Mailer.CharSet = 1

  rem ------------------------------------
  rem - Set the TimeOut
  rem   Default timeout is 60
  rem ------------------------------------
  rem Mailer.Timeout = 30

  rem ------------------------------------
  rem - Send the message
  rem ------------------------------------
  rem SendMail returns a true or false
  rem  success result you can optionally
  rem  test for
  if Mailer.SendMail then
    Response.Write "Mail sent..."
  else
    Response.Write "Mail failure. Check mail host server name and tcp/ip connection...<br>"
    Response.Write Mailer.Response
  end if

%>

</body>
</html>

Pessoal é mais eficaz ou mais fácil de configurar o ASPMAIL ou CDONTS, ou caso alguém conheça uma forma um pouco mais rápido e menos complexa (conheço pouco ASP).

Valeu

Abs,

Danyllo

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,1k
    • Posts
      651,8k
×
×
  • Criar Novo...