--- store/store.module.orig	2009-03-16 13:42:44.000000000 -0800
+++ store/store.module	2009-03-16 13:47:33.000000000 -0800
@@ -1168,6 +1168,9 @@ function store_transaction_form_submit($
 }
 
 function store_send_invoice_email($txnid, $preview = null) {
+  if (variable_get('ec_mail_turned_off', 0)) {
+    return 1;
+  }
   $t = store_transaction_load($txnid);
 
   if ($t->mail && valid_email_address($t->mail)) {
