Permalink
Browse files

[fix] dont send plaintext for templates since we expect them to be ht…

…ml, this should help w/ some of the more esoteric email clients
  • Loading branch information...
1 parent 597e767 commit d1347677ce19e4b7ccd5385411cf45b10fafd1a5 @bmeck bmeck committed Jun 22, 2011
Showing with 9 additions and 7 deletions.
  1. +3 −0 Changelog
  2. +1 −1 Readme.md
  3. +4 −5 lib/node_mailer.js
  4. +1 −1 package.json
View
@@ -1,5 +1,8 @@
node_mailer changelog:
+0.6.4
+- Don't sent plaintext body for templates, only send html, this should help w/ some confusion of email clients that are getting confused
+
0.6.3
- Fix for logging
View
@@ -1,4 +1,4 @@
-#v0.6.3
+#v0.6.4
<img src = "https://github.com/Marak/node_mailer/raw/master/logo.png"/><br/>
###send emails from node.js to your smtp server, simple as cake.
View
@@ -1,5 +1,5 @@
/* Copyright (c) 2009-2010 Marak Squires, Elijah Insua, Fedor Indutny - http://github.com/marak/node_mailer
-
+
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
@@ -8,10 +8,10 @@ copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
-
+
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -106,12 +106,11 @@ exports.send = function node_mail(message, callback) {
// If the template is already fully loaded in the cahe
if (_templateCache[message.template].loaded) {
// Use the cached template and send the email
- message.body = mustache.to_html(_templateCache[message.template].template, message.data);
+ message.html = mustache.to_html(_templateCache[message.template].template, message.data);
pool.send(new EmailMessage(merge(message,{
to: message.to,
sender: message.from,
subject: message.subject,
- body: message.body,
html: message.html,
server: server,
debug: message.debug
View
@@ -1,7 +1,7 @@
{
"name": "mailer",
"description": "send emails from node.js to a smtp server, simple as cake",
- "version": "0.6.3",
+ "version": "0.6.4",
"author": "Marak Squires",
"contributors" : [
"Elijah Insua <tmpvar@gmail.com> (http://tmvpar.com/)",

0 comments on commit d134767

Please sign in to comment.