diff --git a/lib/emailMixin.js b/lib/emailMixin.js
index <HASH>..<HASH> 100644
--- a/lib/emailMixin.js
+++ b/lib/emailMixin.js
@@ -179,8 +179,10 @@ module.exports = function(self) {
       }
       var finalData = {};
 
-      var baseUrl = self.options.baseUrl || req.baseUrl || (req.protocol + '://' + req.get('Host'));
-
+      // Allow middleware to supply baseUrl; if it's not there
+      // use the sitewide option; if that's not there construct it
+      // from what we do know about the request
+      var baseUrl = req.baseUrl || self.options.baseUrl || (req.protocol + '://' + req.get('Host'));
       var parsed = urls.parse(baseUrl);
       var host = parsed.host;
       var protocol = parsed.protocol;
@@ -218,7 +220,6 @@ module.exports = function(self) {
         text: module.render(template + '.txt', finalData, req),
         html: module.render(template + '.html', finalData, req)
       };
-      // console.log(message);
       return module._mailer.sendMail(message, callback);
     };
allow req.baseUrl to beat out the baseUrl option; we never set it, so assume it was set thoughtfully by a middleware dev and should be respected