title: Sending Email's Using GoDaddy Hosting With PHPMailer?
body: <p>I'm currently working on getting a website up and running for my Virtual Company, I have been researching and can't find the answer to this anywhere.</p>
  
  <p>When a user Signs up, I want them to receive an email giving a brief outline of the company. Here is the code that I use (<strong>And Yes, the $_SESSION Variables do have Values</strong>)</p>
  
  <pre><code>&lt;?php
  session_start();
  
  require '../../PHPMailer/PHPMailerAutoload.php';
  
  $EmailUsername = $_SESSION['Username'];
  $EmailFirstName = $_SESSION['FirstName'];
  $EmailEmail = $_SESSION['Email'];
  
  $mail = new PHPMailer;
  
  //$mail-&gt;SMTPDebug = 3;                               // Enable verbose debug output
  
  $mail-&gt;isSMTP();                                      // Set mailer to use SMTP
  $mail-&gt;Host = 'localhost';  // Specify main and backup SMTP servers
  $mail-&gt;SMTPAuth = true;                               // Enable SMTP authentication
  $mail-&gt;Username = 'no-reply@ozzietransport.org';                 // SMTP username
  $mail-&gt;Password = '#Password';                           // SMTP password
  $mail-&gt;SMTPSecure = 'ssl';                            // Enable TLS encryption, `ssl` also accepted
  $mail-&gt;Port = 25;                                       // TCP port to connect to
  
  $mail-&gt;setFrom('no-reply@ozzietransport.org', 'No-Reply');
  $mail-&gt;addAddress($EmailEmail, $EmailFirstName);     // Add a recipient
  $mail-&gt;addAddress('');               // Name is optional
  $mail-&gt;addReplyTo('', '');
  $mail-&gt;addCC('');
  $mail-&gt;addBCC('');
  
  $mail-&gt;addAttachment('');         // Add attachments
  $mail-&gt;addAttachment('');    // Optional name
  $mail-&gt;isHTML(true);                                  // Set email format to HTML
  
  $mail-&gt;Subject = 'Ozzie Transport Signup';
  $mail-&gt;Body    =    "Hello, $EmailUsername.
                      &lt;br&gt;&lt;br&gt;
                      Welcome to &lt;b&gt;Ozzie Transport.&lt;/b&gt; A Virtual Trucking Company Utilising Truckers MP’s Multiplayer's Servers on Both American Truck Simulator and European Truck Simulator 2.
                      &lt;br&gt;&lt;br&gt;
                      &lt;b&gt;Ozzie Transport&lt;/b&gt; was founded by &lt;i&gt;Mr. Will Lads&lt;/i&gt; and &lt;i&gt;Mr. Jacob Findlater&lt;/i&gt;. Who where major assets to Ozzie Transport's Beginning.
                      &lt;br&gt;&lt;br&gt;
                      Your Account is in the process of activation by our current Driver Manager. &lt;i&gt;Luc Jones&lt;/i&gt;, You may log into your account using the Username and Password given in your Sign Up Application. 
                      &lt;br&gt;&lt;br&gt;
                      &lt;b&gt;Username:&lt;/b&gt; &lt;i&gt;$EmailUsername.&lt;/i&gt;
                      &lt;br&gt;&lt;br&gt;
                      &lt;b&gt;&lt;i&gt;If you have any questions, please reply to this email. We would be happy to hear from you.&lt;/i&gt;&lt;/b&gt;
                      &lt;br&gt;&lt;br&gt;
                      &lt;b&gt;Kind Regards&lt;/b&gt;
                      &lt;br&gt;&lt;b&gt;&lt;i&gt;Joshua Micallef&lt;br&gt;
                      Chief Executive Officer - Ozzie Transport
                      ";
  
  if(!$mail-&gt;send()) {
      echo 'Message could not be sent.';
      echo 'Mailer Error: ' . $mail-&gt;ErrorInfo;
  } else {
      echo 'Message has been sent';
  }
  
  session_destroy();
  //header("Location: ../../Login.php");
  </code></pre>
  
  <p>Every time I run the code it gives me the following error Message: Message could not be sent.Mailer Error: SMTP connect() failed. <a href="https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting" rel="nofollow noreferrer">https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting</a>.</p>
  
  <p>Anyone got any ideas, I believe there are still people wondering about this.</p>