PHPMailer works on localhost, but fails on server
问题 My script runs perfect on my localhost on WAMP, but when I try to run it on my server it fails, I tried also to run it on another server and it sends me the same error. This is the error I get when running the script on the server: > SMTP ERROR: Failed to connect to server: Connection timed out (110) > SMTP connect() failed. This is my PHPMailer configuration: require ('PHPMailer-master/PHPMailerAutoload.php'); $alertvalue = $_GET["alert"]; $mail = new PHPMailer(); echo "<p> Instance created.