How does drupal send emails by default? I have a site working on drupal 6 , and i uses drupal's default email function drupal_mail() to send emails , but unfortunately its not sending email and gives me "email not send , please contact site administrator" error , is there any smtp settings i need to include ?

When i tried like follows :

$to = "test@example.com"; // to e-mail address
$from = "test@example.com"; // from e-mail address
$subject = "text to display in e-mail subject"; // subject of e-mail
$body = "text to display in e-mail body"; 
//params is the array passed to hook_mail function 
$params = array(
    'subject' =&gt; $subject,
    'body' =&gt; $body,
    );

if(drupal_mail('test', 'information', $to, language_default(), $params, $from)){
     echo "mail send successfully";
}


it gives me mail send successfully message but mail is not delivered .
Next to drupal_mail you also need https://api.drupal.org/api/drupal/developer%21hooks%21core.php/function/hook_mail/6 to send the mails.

This hooks tells Drupal what to do with 'params'. $params['body'] does not automaticaly becomes the body.

From the example module:

function email_example_mail($key, &amp;$message, $params) {
  global $user;

  // Each message is associated with a language, which may or may not be the
  // current user's selected language, depending on the type of e-mail being
  // sent. This $language variable is used later in the t() calls for subject
  // and body to ensure the proper translation takes effect.
  $language = $message['language'];

  switch ($key) {
    // Send a simple message from the contact form.
    case 'contact_message':
      $message['subject'] = t('E-mail sent from @site-name', array('@site-name' =&gt; variable_get('site_name', 'Drupal')), $language-&gt;language);
      // Note that the message body is an array, not a string.
      $message['body'][] = t('@name sent you the following message:', array('@name' =&gt; $user-&gt;name), $language-&gt;language);
      // Because this is just user-entered text, we do not need to translate it.
      $message['body'][] = $params['message'];
      break;
  }
}


Take extra notice the body is an array!
Edit: some clarification:
The subject of the message is a string, like you would expect. So you can fill the subject line like this:

$message['subject'] = 'Any string, with '. $param['subject'] .  ' or not.';


The body however is not a string, and can not be filled this way. It's an array of strings. The very least you need one part. e.g.:

$message['body'][] = $params['body'];


In the end, Drupal wil implode the array to one big string.

Putting the body in parts allows for other modules to use hook_mail_alter, to change only parts of the e-mail, e.g. only the heading of the message.

/end edit

However, without this hook your mail should have been sent. But it is very likely it was blocked by a spam filter (empty body and empty subject from, probably, an unauthorized source).