2
I don’t understand why the PHP Mailer does not work on my Localhost. It’s like this:
# Envia Emails Para Departamento Escolhido e para o Admin
$mail = new PHPMailer;
$mail->isSMTP();
$mail->Host = 'smtp.dominio.com.br'; # 'dominio' é só um pseudo
$mail->SMTPAuth = true;
$mail->SetLanguage('br');
$mail->Username = '[email protected]';
$mail->Password = 'dominio123';
$mail->SMTPSecure = '';
$mail->Port = 587;
And give me the following mistake:
stream_socket_enable_crypto(): Peer Certificate CN=`*. uni5.net' Did not match expected CN='smtp.dominio.com.br''
It’s right the SMTP. In Laravel I also use this same email, user and password and it works. In Smtpsecure I have to get the TLS
.
But localhost gives this error. I haven’t tried it on the network yet.
do you have an email server installed on your localhost? Maybe this is it.
– Amanda Lima
I don’t know how to see that, but I believe so, because Lavarel also uses and works.
– Diego Souza
On my localhost works perfectly, n know which server vc uses, I am using usb webserver, try to check your settings.
– Igor Silva