title: PHP SMTP mail function not working with phpmailer
body: <p>PHP SMTP mail function not working with phpmailer and throwing following error </p>
  
  <blockquote>
    <p><strong>Error:</strong> SMTP Error: Language string failed to load: tls.</p>
  </blockquote>
  
  <p>My Code is :</p>
  
  <pre><code>require_once('class.phpmailer.php');
  
  $mail  = new PHPMailer();   
  $mail-&gt;IsSMTP();    
  $mail-&gt;SMTPAuth   = True;                  // enable SMTP authentication
  $mail-&gt;SMTPSecure = "tls";                 // sets the prefix to the server
  $mail-&gt;Host       = "localhost";      
  $mail-&gt;Port       = 25;                 
  $mail-&gt;Username   = "xxxxxx@xxxxx.org.in";  // my username
  $mail-&gt;Password   = "xxxx";            // my password
  
  $mail-&gt;From       = "xxxxxxx@xxxxx.org.in";
  $mail-&gt;FromName   = "you name";
  $mail-&gt;Subject    = "some subject";
  $mail-&gt;MsgHTML("the message");
  
  $mail-&gt;AddAddress("yyyyyy@gmail.com","logan");
  $mail-&gt;IsHTML(true); // send as HTML
  
  if(!$mail-&gt;Send()) {//to see if we return a message or a value bolean
      echo "Mailer Error: " . $mail-&gt;ErrorInfo;
  } else  echo "Message sent!";
  </code></pre>
  
  <p>I have got the host and port details my web service provider but not working.</p>
  
  <p>When i debug, following is the error:</p>
  
  <pre><code>SMTP -&gt; FROM SERVER:220 We do not authorize the use of this system to transport unsolicited, and/or bulk e-mail.
  SMTP -&gt; FROM SERVER: 250-mail02.clientns.net [127.0.0.1], this server offers 4 extensions 250-AUTH LOGIN 250-SIZE 52428800 250-HELP 250 AUTH=LOGIN
  SMTP -&gt; FROM SERVER:503 Bad sequence of commands
  SMTP -&gt; ERROR: STARTTLS not accepted from server: 503 Bad sequence of commands
  SMTP -&gt; FROM SERVER:250 Requested mail action okay, completed
  Language string failed to load: tls Mailer Error: Language string failed to load: tls
  </code></pre>
  
  <p>Could any one please let me know why is it not connecting ?</p>