alexyoung/nodepad — Issue #18: Emails not being sent using new renderJadeFile function
Author: omgaz
Created: 2012-02-20 14:50:04+00:00
State: open

Issue found after commit #15

```javascript
renderJadeFile(path.join(__dirname, 'views', 'mailer', template), templateOptions, function(err, text) {
// Add the rendered Jade template to the mailOptions
mailOptions.body = text;
...
```
The renderJadeFile function does not execute the function(err, text) callback, thus no email gets sent.

For my own purposes I do not need the function to return so am using the following, which resolves the issue and emails are sent:
```javascript
function renderJadeFile(template, options, fn) {
var html = jade.compile(template, options);
fn(html(options.locals));
}
```