title: SocketException Permission denied - CakePHP 2.3
body: <p>I receive that error when try send e-mail with <strong>CakePHP 2.3.0</strong>.<br />
  My Cloud configuration is:</p>
  
  <ul>
  <li>PHP 5.4</li>
  <li>Apache 2.2</li>
  <li>MySQL 5.5</li>
  <li>CakePHP 2.3.0</li>
  </ul>
  
  <p>Sorry about my english.</p>
  
  <hr>
  
  <pre><code>2013-03-06 09:15:05 Error: [SocketException] Permission denied
  Request URL: /notifications/sendContact
  Stack Trace:
  #0 /var/www/html/site/lib/Cake/Network/Email/SmtpTransport.php(96): CakeSocket-&gt;connect()
  #1 /var/www/html/site/lib/Cake/Network/Email/SmtpTransport.php(60): SmtpTransport-&gt;_connect()
  #2 /var/www/html/site/lib/Cake/Network/Email/CakeEmail.php(1065): SmtpTransport-&gt;send(Object(CakeEmail))
  #3 /var/www/html/site/app/Controller/NotificationsController.php(41): CakeEmail-&gt;send()
  #4 [internal function]: NotificationsController-&gt;sendContact()
  #5 /var/www/html/site/lib/Cake/Controller/Controller.php(485): ReflectionMethod-&gt;invokeArgs(Object(NotificationsController), Array)
  #6 /var/www/html/site/lib/Cake/Routing/Dispatcher.php(186): Controller-&gt;invokeAction(Object(CakeRequest))
  #7 /var/www/html/site/lib/Cake/Routing/Dispatcher.php(161): Dispatcher-&gt;_invoke(Object(NotificationsController), Object(CakeRequest), Object(CakeResponse))
  #8 /var/www/html/site/app/webroot/index.php(102): Dispatcher-&gt;dispatch(Object(CakeRequest), Object(CakeResponse))
  #9 {main}
  2013-03-06 09:15:05 Error: Fatal Error (256): [CakeException] Unknown status code
  #0 /var/www/html/site/lib/Cake/Error/ExceptionRenderer.php(212): CakeResponse-&gt;statusCode(13)
  #1 [internal function]: ExceptionRenderer-&gt;error400(Object(SocketException))
  #2 /var/www/html/site/lib/Cake/Error/ExceptionRenderer.php(175): call_user_func_array(Array, Array)
  #3 /var/www/html/site/lib/Cake/Error/ErrorHandler.php(122): ExceptionRenderer-&gt;render()
  #4 [internal function]: ErrorHandler::handleException(Object(SocketException))
  #5 {main} in [/var/www/html/site/lib/Cake/Error/ErrorHandler.php, line 131]
  2013-03-06 09:15:05 Error: [InternalErrorException] Internal Server Error
  Request URL: /notifications/sendContact
  Stack Trace:
  #0 /var/www/html/site/lib/Cake/Error/ErrorHandler.php(183): ErrorHandler::handleFatalError(256, '[CakeException]...', '/var/www/html/p...', 131)
  #1 [internal function]: ErrorHandler::handleError(256, '[CakeException]...', '/var/www/html/p...', 131, Array)
  #2 /var/www/html/site/lib/Cake/Error/ErrorHandler.php(131): trigger_error('[CakeException]...', 256)
  #3 [internal function]: ErrorHandler::handleException(Object(SocketException))
  #4 {main}
  2013-03-06 09:15:05 Error: Fatal Error (256): [CakeException] Unknown status code
  #0 /var/www/html/site/lib/Cake/Error/ExceptionRenderer.php(212): CakeResponse-&gt;statusCode(13)
  #1 [internal function]: ExceptionRenderer-&gt;error400(Object(SocketException))
  #2 /var/www/html/site/lib/Cake/Error/ExceptionRenderer.php(175): call_user_func_array(Array, Array)
  #3 /var/www/html/site/lib/Cake/Error/ErrorHandler.php(122): ExceptionRenderer-&gt;render()
  #4 [internal function]: ErrorHandler::handleException(Object(SocketException))
  #5 {main} in [/var/www/html/site/lib/Cake/Error/ErrorHandler.php, line 131]
  2013-03-06 09:15:05 Error: [InternalErrorException] Internal Server Error
  Request URL: /notifications/sendContact
  Stack Trace:
  #0 /var/www/html/site/lib/Cake/Error/ErrorHandler.php(183): ErrorHandler::handleFatalError(256, '[CakeException]...', '/var/www/html/p...', 131)
  #1 [internal function]: ErrorHandler::handleError(256, '[CakeException]...', '/var/www/html/p...', 131, Array)
  #2 /var/www/html/site/lib/Cake/Core/App.php(926): call_user_func('ErrorHandler::h...', 256, '[CakeException]...', '/var/www/html/p...', 131, Array)
  #3 /var/www/html/site/lib/Cake/Core/App.php(899): App::_checkFatalError()
  #4 [internal function]: App::shutdown()
  #5 {main}
  </code></pre>
  
  <hr>
  
  <h1>email.php</h1>
  
  <pre><code>public $gmail = array(
      'transport' =&gt; 'Smtp',
      'from' =&gt; array('patric.....@gmail.com' =&gt; 'Patrick Maciel'),
      'port'=&gt;'465',
      'timeout'=&gt;'30',
      'auth' =&gt; true,
      'host' =&gt; 'ssl://smtp.gmail.com',
      'username'=&gt;'patrick......@gmail.com',
      'password'=&gt;'.......',
      'client' =&gt; null,
      'log' =&gt; false
  );
  </code></pre>
  
  <hr>
  
  <h1>php info (centOs)</h1>
  
  <pre><code>-bash-4.1# yum info php
  Loaded plugins: fastestmirror
  Loading mirror speeds from cached hostfile
   * base: mirror.globo.com
   * epel: mirror.globo.com
   * extras: mirror.globo.com
   * updates: mirror.globo.com
  Installed Packages
  Name       : php
  Arch       : i686
  Version    : 5.4.12
  Release    : 1.el6.remi
  Size       : 8.2 M
  Repo       : installed
  From repo  : remi
  Summary    : PHP scripting language for creating dynamic web sites
  URL        : http://www.php.net/
  License    : PHP and Zend and BSD
  Description: PHP is an HTML-embedded scripting language. PHP attempts to make it
             : easy for developers to write dynamically generated web pages. PHP also
             : offers built-in database integration for several commercial and
             : non-commercial database management systems, so writing a
             : database-enabled webpage with PHP is fairly simple. The most common
             : use of PHP coding is probably as a replacement for CGI scripts.
             :
             : The php package contains the module which adds support for the PHP
             : language to Apache HTTP Server.
  
  Available Packages
  Name       : php
  Arch       : i386
  Version    : 5.3.22
  Release    : 1.w5
  Size       : 1.3 M
  Repo       : webtatic
  Summary    : PHP scripting language for creating dynamic web sites
  URL        : http://www.php.net/
  License    : PHP
  Description: PHP is an HTML-embedded scripting language. PHP attempts to make it
             : easy for developers to write dynamically generated web pages. PHP also
             : offers built-in database integration for several commercial and
             : non-commercial database management systems, so writing a
             : database-enabled webpage with PHP is fairly simple. The most common
             : use of PHP coding is probably as a replacement for CGI scripts.
             :
             : The php package contains the module which adds support for the PHP
             : language to Apache HTTP Server.
  
  -bash-4.1# php -m
  [PHP Modules]
  bz2
  calendar
  Core
  ctype
  curl
  date
  dom
  ereg
  exif
  fileinfo
  filter
  ftp
  gd
  gettext
  gmp
  hash
  iconv
  imap
  intl
  json
  libxml
  mbstring
  mcrypt
  memcache
  mhash
  mysql
  mysqli
  openssl
  pcntl
  pcre
  PDO
  pdo_mysql
  pdo_sqlite
  Phar
  pspell
  readline
  recode
  Reflection
  session
  shmop
  SimpleXML
  snmp
  sockets
  SPL
  sqlite3
  standard
  tidy
  tokenizer
  wddx
  xml
  xmlreader
  xmlrpc
  xmlwriter
  xsl
  zip
  zlib
  
  [Zend Modules]
  
  -bash-4.1#
  </code></pre>