Bootstrap DrupalTo be able to use all Drupal's functions you need to have them loaded:
Don't send 1000s of e-mails
Calling the hooks has one possible side effect. Sending mails. No matter how much you switch off assume there is something that will try and mail out. There are a couple of modules for doing this including Devel. In this case, keeping it light, I just
variable_set('smtp_library', 'db_mail.inc'); db_mail.inc just having a function:
print "mail to $to about $subject";
... as it's nice to see what's going on sometimes.