PHPMailer, SMTP connect() failed error with Gmail I’m trying to make a contact form and I’m using PHPMailer. I tried that on localhost with xampp and it works perfect. But when i upload to my host i get the error SMTP connect() failed. Here is my code: $m = new PHPMailer; $m->isSMTP(); $m->SMTPAuth = true; $m->Host = "smtp.gmail.com"; $m->Username = "mymail@gmail.com"; $m->Password = "mypass"; $m->SMTPSecure = "ssl"; $m->Port = "465"; $m->isHTML(); $m->Subject = "Hello world"; $m->Body = "Some content"; $m->FromName = "Contact"; $m->addAddress('mymail@gmail.com', 'Test');
undefined
PHPMailer with GMail: SMTP Error I am making use of PHPMailer to send mail through GMail. The code I use is straight from a tutorial and it works perfectly on my laptop. However, testing this on a Windows 2003 Server - it seems to always return an SMPT error: SMTP Error: Could not connect to SMTP host. Mailer Error: SMTP Error: Could not connect to SMTP host. Here is the settings I use in PHPMailer: include("phpmailer/class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPAuth =
undefined
PHPMailer: SMTP Error: Could not connect to SMTP host I've used PHPMailer on several projects but now I'm stuck. It gives me the error:SMTP Error: Could not connect to SMTP host.I've tried sending email from Thunderbird and it works ! But not through PHPMailer ... Here are the settings from Thunderbird: Server name: mail.exampleserver.comPort: 587Username: user@exampleserver.comSecure Authentication: NoConnection Security: STARTTLS I've compared these with the server at my last project where I used PHPMailer and they were: Server name: mail.exampleserver2.comPort: 465Username: user@exampleserver2.comSecure Authentication:
undefined
“SMTP Error: Could not authenticate” in PHPMailer I'm Using PHPMailer in a Simple Script For Send Email's Through Gmail, And I'm Getting an "Unknown Error" (At least For me!): SMTP Error: Could not authenticate. Error: SMTP Error: Could not authenticate. SMTP server error: 5.7.1 Username and Password not accepted. Learn more at 535 5.7.1http://mail.google.com/support/bin/answer.py?answer=14257 p38sm2467302ybk.16 I've Read About Configure OpenSSL For SSL/TLS Connections, and i did it. Apache And PHP Are properly-Configured (With OpenSSL extension Running in PHP and mod_ssl