-1

I am using PHPMailer 5.2.0 for sending mail from localhost using my GMAIL account, it works perfectly, but when I hosted whole contents to a free sub-domain in getmeleave.orgfree.com, I get a error message as follows

SMTP Error: Could not connect to SMTP host.

Please give me solution for this, as it is my final year project. Thank you

scott_lotus
  • 3,171
  • 22
  • 51
  • 69
  • refer this : http://stackoverflow.com/questions/3477766/phpmailer-smtp-error-could-not-connect-to-smtp-host – Mr. Engineer Jan 29 '16 at 06:22
  • Search before posting (there are many duplicates of this question), and read the PHPMailer docs. If you're running 5.2.0, that is truly ancient - upgrade to [the latest version](https://github.com/PHPMailer/PHPMailer). – Synchro Jan 29 '16 at 07:22

1 Answers1

0

In many case with this issue, Solution like lack of SSL support in PHP. So you need to enable like:

extension=php_openssl.dll

If not solve this?. I suggest you to enable the SMTP debug available on the SMTP configuration page and then try to send an email. It will give you a more detailed story of why you can't send the message.

$mail->SMTPDebug = 1;

Once you set true it will report you what is the SMTP error.

AddWeb Solution Pvt Ltd
  • 21,025
  • 5
  • 26
  • 57