title: Swiftmailer working on localhost but not in production
body: <p>On my localhost (Linux Mint OS) Swiftmailer is working fine with the following code, but whenever I move it up to my server is just hangs at the send function and then gives me an internal server error.</p>
  
  <p>I currently have my email setup through Google Apps, so maybe SMTP will not work for this situation? If thats the case, how do you suggest I change this from SMTP. </p>
  
  <p>Also, whenever I send an email like this, it is showing up with a from address of the one in the username area. I want it to show up with the from address in the "setFrom" function.</p>
  
  <pre><code>//Include the swiftmailer class
  require_once 'comm/swiftmailer/swift_required.php';
  
  //Create a message
  //Pass it as a parameter when you create the message
  $message = Swift_Message::newInstance();
  $message-&gt;setSubject('My Subject');
  $message-&gt;setFrom(array('noreply@domain.com' =&gt; 'No Reply'));
  $message-&gt;setTo(array('me@domain.com' =&gt; 'Me'));
  $message-&gt;setBody($emailContent, 'text/html');
  
  //Create transport class and email the message
  $transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 465, 'ssl')-&gt;setUsername('useracctname')-&gt;setPassword('password');
  $mailer = Swift_Mailer::newInstance($transport);
  $result = $mailer-&gt;send($message);
  </code></pre>
  
  <p>Thanks a lot for any help!</p>