SMTP sending error with gmail

0

I would like your help, I am sending a simple contact form email, using google smpt, because my domain is managed by a gsuite account.

When trying to send me the following returns:

220 smtp.googlemail.com ESMTP x30sm11793366qtm.13 - gsmtp

hello: 250-smtp.googlemail.com at your service, [179.188.50.70]
250-SIZE 35882577
250-8BITMIME
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-CHUNKING
250 SMTPUTF8
starttls: 220 2.0.0 Ready to start TLS
hello: 250-smtp.googlemail.com at your service, [179.188.50.70]
250-SIZE 35882577
250-8BITMIME
250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-CHUNKING
250 SMTPUTF8
from: 250 2.1.0 OK x30sm11793366qtm.13 - gsmtp
to: 250 2.1.5 OK x30sm11793366qtm.13 - gsmtp
data: 354  Go ahead x30sm11793366qtm.13 - gsmtp

quit: 
Foi encontrado a seguinte mensagem de erro SMTP: 
Foi encontrado a seguinte mensagem de erro SMTP:
Não foi possível enviar o email utilizando PHP SMTP. Talvez o seu servidor não esteja configurado para enviar emails utilizando este método.
Date: Mon, 26 Mar 2018 14:49:36 -0300

Can anyone help me?

    
asked by anonymous 26.03.2018 / 19:59

1 answer

0

Probably something not configured on the web server (php.ini). If you really want to use the mail () function you will have to change php.ini in this line:

smtp = o seu email (e.g) [email protected]
smtp_port = 25 (verifique a porta)

If you do not want to tweak the php configuration, I suggest you use phpmailer.

    
26.03.2018 / 20:30