feliper 0 Denunciar post Postado Abril 7, 2016 Olá, estou tendo dificuldade com phpmailer, após o provedor atualizar a versão do php parou de funcionar. Aparecendo a seguinte mensagem: Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /home/XXXXX/public_html/exemplo/smtp/class.smtp.php on line 344Não foi possível enviar a mensagem. Erro: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting Alguém já teve este problema ou sabe como resolve-lo? Abaixo o codigo: <?php require_once 'smtp/PHPMailerAutoload.php'; $M = new PHPMailer(); # $M->SMTPDebug = 2; # Somente para debug $M->isSMTP(); # Informamos que é SMTP $M->Host = 'mail.exemplo.com.br'; # Colocamos o host de envio de e-mail. $M->SMTPAuth = true; # Informamos que terá autenticação de SMTP. $M->Username = 'exemplo@exemplo.com.br'; # Usuário $M->Password = '10203040'; # Senha $M->Port = 587; # Porta de disparo. #$M->SMTPSecure = 'ssl'; # Caso tenha segurança. $mail->SMTPOptions = array( 'ssl' => array( 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true ) ); $M->From = 'exemplo@exemplo.com.br'; # Remetente do disparo. $M->FromName = 'Exemplo'; # Nome do remetente. $M->addAddress('email@aqui.com.br', 'NOME AQUI'); # Destinatário. $M->isHTML(); # Informamos que o corpo tem o formato HTML. $M->Subject = 'Eu sei mandar e-mail com o PHPMailer.'; # Assunto da mensagem. # Corpo da mensagem: $M->Body = "<html><head></head><body><h1>Oi eu sei mandar e-mail com o PHPMailer!!!</h1></body></html>"; # Enviamos: if (!$M->send()) echo "Não foi possível enviar a mensagem. Erro: " . $M->ErrorInfo; else echo 'true'; Compartilhar este post Link para o post Compartilhar em outros sites