upon making the first User, the following message apperars

Fatal error: Call to undefined function mail() in /www/htdocs/main/modules/user.module on line 405

Comments

yasheshb’s picture

Fatal error: Call to undefined function mail() in /opt/apache2/htdocs/drupal-4.7.3/modules/user.module on line 425

any pointers on whats wrong ?

thx.
yb.

Yashesh Bhatia

yasheshb’s picture

emacs $drupal_home/modules/user.module

check out the line

return mail(
$mail,
mime_header_encode($subject),
str_replace("\r", '', $message),
"MIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8; format=flowed\nContent-transfer-encoding: 8Bit\n" . $header
);

above the following lines add

echo "
$subject
$message\n";
exit(1);

this will now not give an error message but show some lame duck message on ur screen like

Drupal user account details for yasheshb
yasheshb, You may now login to http://localhost/drupal using the following username and password: username: yasheshb password: rdP3yf2s6w2 http://localhost/drupal/?q=user/1/edit --drupal

now copy ur password rdP3yf2s6w2 and use it to login to drupal.

Yashesh Bhatia