how to set smtp for drupal I am working on Drupal 6  my php.ini settings are:     

SMTP = localhost    
smtp_port = 25    


in module in am using     

function article_mail($key, &amp;$message, $params) {    
  switch ($key) {    
    case 'invitation':    
      // note: data can be passed to this function in the $params array    
      $message['subject'] = t('EMAIL SUBJECT');    
      $message['body'] = t('MESSAGE BODY');    
      break;          
  }
}


and in code i use     

$params = array(  'myVar' =&gt; 'data you would like in your message and/or subject',);    
drupal_mail('article', 'invitation', 'sanjaydev@xolva.com', language_default(), $params);


but it gives     


  warning: mail(): Failed to connect to mailserver at "localhost" port
  25, verify your "SMTP" and "smtp_port" setting in php.ini or use
  ini_set() in C:\Program Files (x86)\Apache Software
  Foundation\Apache2.2\htdocs\benthamdirect\includes\mail.inc on line
  193. Unable to send e-mail. Please contact the site administrator if the problem persists.


Can anyone suggest where I am going wrong?
Try the SMTP module to send mails via SMTP:


  This module allows Drupal to bypass the PHP mail() function and send email directly to an SMTP server. The module supports SMTP authentication and can even connect to servers using SSL if supported by PHP.