Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Please ignore, I found the ssl in the php extensions after all. Funny how you find the answer by yourself right after you post.

This question is related to development but I think it has to do with admin settings, it might get closed on stackoverflow.

I'm testing code on my local devel environment that should send email through Gmail's smtp server, but I'm getting an error Unable to connect via TLS and was wondering what might be the problem.

I'm on wampserver2 and windows. I don't think wampserver2 comes by default with ssl (at least I can't find a php_ssl extension in the list of php extensions). But the code shows that ssl is probably needed. I'm not that familiar with SSL or tweaking the settings for wampserver2. Does anyone have clues what I might need to do to get this working?

share|improve this question
Please write your solution as an answer and accept it. And don't crosspost, if SO think it doesn't fit, they will send it here. – Sven Jan 27 '11 at 10:50

Check smtp host:

Port for TLS/STARTTLS: 587
Port for SSL: 465

Without the code is hard to say what went wrong.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.