Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By mekyong on
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
same problem - creating first user gives error message
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
got a workaround.. but it's very dirty
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