title: Trying to send mail using yahoo smtp in php
body: <p>Please can some one suggest me codes to send mails using yahoo smatp, and php.. </p>
  
  <pre><code>require("class.phpmailer.php"); // be sure to change this to your location!
  
  $mail = new PHPMailer();    
  $mail-&gt;IsSMTP();
  $mail-&gt;SMTPAuth = true; // enable SMTP authentication
  $mail-&gt;SMTPSecure = "ssl"; // sets the prefix to the servier    
  
  $mail-&gt;Host = "smtp.mail.yahoo.com"; // sets yahoo as the SMTP server    
  $mail-&gt;Port = 25; // set the SMTP port    
  $mail-&gt;Username = "sumthing@yahoo.com"; // yahoo username    
  $mail-&gt;Password = "password"; // yahoo password
  
  $mail-&gt;From = "sumthing@yahoo.com";
  $mail-&gt;FromName = "myname";    
  $mail-&gt;AddAddress("you@example.com");    
  $mail-&gt;Subject = "Test PHPMailer Message";    
  $mail-&gt;Body = "Hi! \n\n This was sent with phpMailer_example3.php.";
  
  if(!$mail-&gt;Send()) {
  
      echo 'Message was not sent.';    
      echo 'Mailer error: ' . $mail-&gt;ErrorInfo;
  
  } else {
  
      echo 'Message has been sent.';
  
  }
  </code></pre>
  
  <p>This code is giving me errrors 'Could not connect to SMTP host". </p>