Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    Jul 2006
    Messaggi
    3,072

    Invio mail tramite smtp google e problema su server

    Ciao a tutti, sto cercando di utilizzare su un server dedicato uno script php per l'invio di mail che funziona correttamente su altri server; nel dettaglio utilizzo l'invio tramite l'SMTP autenticato di google ma su questo server ottengo l'errore:

    SMTP -> ERROR: Failed to connect to server: (0)
    Error:

    SMTP Error: Could not connect to SMTP host.


    nel dettaglio lo script ha:

    $mail->SMTPDebug = 1; // enables SMTP debug information (for testing)
    $mail->SMTPAuth = true; // enable SMTP authentication
    $mail->SMTPSecure = "ssl"; // sets the prefix to the servier
    $mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
    $mail->Port = 465; // set the SMTP port for the GMAIL server
    $mail->Username = "xxxxxxxxxx"; // GMAIL username
    $mail->Password = "zzzzzzzzz";


    Secondo voi quale potrebbe essere il problema???

    Grazie

  2. #2
    Strano... Tutti i dati sembrano corretti.
    L'unica possibilità è una qualche restrizione del tuo servizio di hosting, prova a contattarne l'amministratore. Non so come funzioni il sistema che usi, ma il problema potrebbe dipendere dalla direttiva allow_url_fopen del php.ini. Prova a controllare il phpinfo().

    Facci sapere!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.