title: CakePHP SMTP EMail Not Working on Server
body: <p>I am able to send SMTP Emails from my local server machine in CakePHP while I am not able to do the same on my GoDaddy live server, in CakePHP.</p>
  
  <p>Any ideas for the same?</p>
  
  <p>Thanks</p>
  
  <p><strong><code>Answer is below as per my experience with GoDaddy:</code></strong></p>
  
  <p>Below code is working for me over GoDaddy server using CakePHP SMTP Email:</p>
  
  <p>Email.php file inside config folder - CakePHP 2.4 MVC version:</p>
  
  <pre><code>    // for Live Server GoDaddy.com domain
      public $smtp = array(
          'transport' =&gt; 'Smtp',
          'host' =&gt; 'ssl://smtpout.asia.secureserver.net', // important
          'port' =&gt; 465, // important
          #'timeout' =&gt; 30,
          'username' =&gt; 'no-reply@godaddy-domain.com',
          'password' =&gt; 'password',
          #'tls' =&gt; false,
          #'log' =&gt; false,
          'charset' =&gt; 'utf-8',
          'headerCharset' =&gt; 'utf-8',
      );
  </code></pre>
  
  <p>And here is the controller file code below:</p>
  
  <pre><code>    // Controller Code to Send Actual Email
      // email configuration
      $Email = new CakeEmail('smtp');
      $Email-&gt;from(array('no-reply@godaddy-domain.com' =&gt; 'App Name'))
          -&gt;sender('no-reply@godaddy-domain.com', 'App Name')
          -&gt;to(array($email))
          -&gt;bcc(array('xyz@xyz.com'))
          -&gt;subject('Test Email from GoDaddy')
          -&gt;emailFormat('both')
          -&gt;send($hash.'&lt;br&gt;&lt;strong&gt;My&lt;/strong&gt; message 45 قبل الميلاد، مما يجعله أكثر من');
  </code></pre>
  
  <p>Hope it helps !</p>
  
  <p>Thanks</p>