Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > it.comp.www.php > #21653

Re: phpmailer XAMMP e Windows 10

From NoS <NoS@nospam.no>
Newsgroups it.comp.www.php
Subject Re: phpmailer XAMMP e Windows 10
Date 2017-08-03 13:51 +0200
Organization Aioe.org NNTP Server
Message-ID <olv2na$165p$1@gioia.aioe.org> (permalink)
References <oluqhq$mnb$1@gioia.aioe.org>

Show all headers | View raw


Ho trovato la soluzione la posto qui nel caso servisse ad altri.
Ho risolto inserendo:

$mail->SMTPOptions = array(
     'ssl' => array(
         'verify_peer' => false,
         'verify_peer_name' => false,
         'allow_self_signed' => true
     )
);

Non ho però capito il motivo (ripeto in win 8 andava in win 10 no, gli 
ambienti di sviluppo sono identici).






Il 03/08/2017 11:31, NoS ha scritto:
> Scusate ma sto impazzendo.
> 
> Ho da poco aggiornato il sistema operativo ed ora ho problemi nel 
> testare l'invio mail da locale.
> 
> Ho script che su win 8, con lo stesso ambiente locale, giravano 
> perfettamente e su win 10 hanno problemi di connessione SMTP -> SMTP 
> connect() failed.
> 
> Ho cercato in rete ma non ho trovato soluzioni.
> 
> Il codice che utilizzo per il test è il seguente
> 
>      //INVIO MAIL A: utente
>      $mail = new PHPMailer(true);
>      $mail->SMTPDebug  = 1;
> $mail->IsSMTP();
> $mail->SMTPAuth = true;
> $mail->SMTPSecure = 'ssl';              // Use SSL
> $mail->Host = 'smtp.gmail.com';         // Server SMTP
> $mail->Port = 465;                      // Porta SMTP
> $mail->Username = 'indirizzo@gmail.com';   // SMTP account username
> $mail->Password = 'xxxxxxxxxxxxxxxx';
>      $mail->setFrom('indirizzo@gmail.com', 'Mailer');
>      $mail->AddAddress('mail@destinatario.com','utenteTest');
>      $mail->isHTML(false);
>      $mail->Subject = "TEST da LOCALE";
>      $mail->Body = "Test Invio Mail";
>      $mail->Send();
>      echo "Message Sent OK\n";
> } catch (phpmailerException $e) {
>      echo $e->errorMessage();
> } catch (Exception $e) {
>      echo $e->getMessage();
> }
> 
> L'unica differenza sembra essere il sys op.
> 
> Qualche consiglio?
> Grazie in anticipo.
> 
> ---
> Questa email è stata esaminata alla ricerca di virus da AVG.
> http://www.avg.com
> 

Back to it.comp.www.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

phpmailer XAMMP e Windows 10 NoS <NoS@nospam.no> - 2017-08-03 11:31 +0200
  Re: phpmailer XAMMP e Windows 10 NoS <NoS@nospam.no> - 2017-08-03 13:51 +0200
    Re: phpmailer XAMMP e Windows 10 Alessandro Pellizzari <shuriken@amiran.it> - 2017-08-04 06:25 +0100
      Re: phpmailer XAMMP e Windows 10 NoS <NoS@nospam.no> - 2017-08-11 08:14 +0200
    Re: phpmailer XAMMP e Windows 10 Leonardo Serni <lserni@gmail.com> - 2017-08-04 11:17 +0200
      Re: phpmailer XAMMP e Windows 10 NoS <NoS@nospam.no> - 2017-09-08 11:30 +0200
        Re: phpmailer XAMMP e Windows 10 Leonardo Serni <lserni@gmail.com> - 2017-09-08 17:09 +0200
          Re: phpmailer XAMMP e Windows 10 NoS <NoS@nospam.no> - 2017-09-08 18:50 +0200
            Re: phpmailer XAMMP e Windows 10 Leonardo Serni <lserni@gmail.com> - 2017-09-08 20:56 +0200
              Re: phpmailer XAMMP e Windows 10 NoS <NoS@nospam.no> - 2017-09-10 09:50 +0200

csiph-web