I finally managed to send an email with the phpmailer class, on localhost, without the need to install ssl on the machine. This tip was tested now in January 2017.
To be able to send email with phpmailer locally, simply edit the file 'class.smtp.php' and right after the line:
public function connect($host, $port = null, $timeout = 30, $options = array()){
static $streamok;
//This is enabled by default since 5.0.0 but some providers disable it
//Check this once and cache the result
enter the code:
if (count($options) == 0){
$options['ssl'] = array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true);
}
hope I’ve helped!!
Hello Jose, welcome! Please separate the question and the solution. Put the solution as the answer by clicking the button below to answer.
– Sergio
I am voting to close this question as out of scope because this is not a question, it is a post, it does not match with the purpose of the OS.
– Thiago Lunardi
Topic changed to fit the scope
– José Dam
On this site we do not add SOLVED in the title. If the question was not closed, the correct would be to post the solution and then accept it.
– user28595
How to answer your own questions.
– ShutUpMagda
I was able to respond. It’s just that while I was in the lurch the reply option was disabled.
– José Dam