Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

855
Visualizações
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Authentication Required. In html

I'm making an SMTP-based mail sender. The code that I entered is -

    <script>
    function sendEmail(){
        Email.send({
            Host : "smtp.gmail.com",
            Username : 'davnit7607@davnitjsr.org',
            Password : "*************",
            To : 'davnit7607@davnitjsr.org',
            From : document.getElementById("email").value,
            Subject : "Contact",
        Body : "And this is the body"
}).then(
  message => alert(message)
);
    }
        
</script>
</body>
</html>

It's not working giving an error - The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Authentication Required. Learn more at - Fix: Try a different SMTP server: https://elasticemail.com/account#/create-account?r=20b444a2-b3af-4eb8-bae7-911f6097521c

And- Mailbox name not allowed. The server response was: Envelope FROM 'hi@gmail.com' email address not allowed. Code

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Your errors...

The SMTP server requires a secure connection or the client was not authenticated.

  1. Are you running on HTTPS?
  2. You didn't provide proper authentication. You do realize you need your real email address (the username attribute; you're using Gmail, so you have to provide your Gmail address) and your real password to send emails from your account, right? (That includes the from field.) Gmail also has some extra complications. See this post on how to send emails from Gmail.

Mailbox name not allowed. The server response was: Envelope FROM 'hi@gmail.com' email address not allowed.

You tried to send an email from "hi@gmail.com". Do you think it will work? Let's pretend your email is bob@gmail.com. If what you attempted didn't result in an error, that means that I can send an email from your email without your permission! So no, that rightly shouldn't work.

All else aside, please don't try to send emails from the client-side. You realize that if you publish your app everyone can see your email address and password, right?

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda