• 0
Sign in to follow this  
crucifier

Enviar Form Para 2 Emails

Question

como eu faco pra enviar um form para 2 emails???

tipw ta assim no codigo:

Set Mail = Server.CreateObject("Persits.MailSender")
      Mail.Host = "localhost"                                                                          ' servidor de email da apcc-pa
      Mail.From = "[email protected]"                                             ' email que servirá de remetente
      Mail.FromName = "Contato Formulário"            
      Mail.AddAddress "[email protected]"                                                        ' email receptor do formulário
      Mail.Subject = Request.form("assunto")                                                        ' assunto do email
          Mail.IsHTML = True
      Mail.Body = vHTML

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Você pode usar cdonts assim:

on error resume next
Set eObjMail = Server.CreateObject("CDONTS.NewMail")
eObjMail.to = ParaEmail
eObjMail.from = NomeEmail & "<" & Email & ">"
eObjMail.subject = Assunto
eObjMail.Importance = 1
eObjMail.BodyFormat = 0
eObjMail.MailFormat = 0
eObjMail.body = Mensagem  
eObjMail.send
Set eObjMail = nothing

Set eObjMail = Server.CreateObject("CDONTS.NewMail")
eObjMail.to = NomeEmail & "<" & Email & ">"
eObjMail.from = ParaEmail
eObjMail.subject = "Seu contato"
eObjMail.Importance = 1
eObjMail.BodyFormat = 0
eObjMail.MailFormat = 0
eObjMail.body = Resposta
eObjMail.send
Set eObjMail = nothing

é uma idéia ok, usei isso no meu e funciona sem problema, basta adapta-lo a sua realidade

ps.: Veja se o seu servidor aceita o componente cdonts

Share this post


Link to post
Share on other sites
  • 0

não sei se entendi sua duvida, mas não seria isso:

Set Mail = Server.CreateObject("Persits.MailSender")

    Mail.Host = "localhost"          ' servidor de email da apcc-pa

    Mail.From = "[email protected]"    ' email que servirá de remetente

    Mail.FromName = "Contato Formulário"           

    Mail.AddAddress "[email protected] ;[email protected]"      ' email receptor do formulário

    Mail.Subject = Request.form("assunto")      ' assunto do email

    Mail.IsHTML = True

    Mail.Body = vHTML

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this