Getting started
Posted July 19th, 2008 by ekes
Bootstrap Drupal
To 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:
function drupal_mail_wrapper($mailkey, $to, $subject, $body, $from, $headers) {
print "mail to $to about $subject";
return true;
}
print "mail to $to about $subject";
return true;
}
... as it's nice to see what's going on sometimes.