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' => $subject, 'body' => $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 .