Skip to content
This repository
Browse code

Command line file inclusion fix

  • Loading branch information...
commit 6356572ae700e9765701d7eb33a59bc7c0fff778 1 parent 017c231
authored September 04, 2012
8  bin/nodemailer
@@ -36,7 +36,7 @@ if(argv.help){
36 36
     console.log(" --textFile=[path]        Plain text mail body from a file");
37 37
     console.log(" --htmlFile=[path]        HTML mail body from a file");
38 38
     console.log(" --stdin=[target]         Read \"text\" or \"html\" from stdin");
39  
-    console.log(" --attachments=[pathlist]  Comma separated list of file paths");
  39
+    console.log(" --attachments=[pathlist] Comma separated list of file paths");
40 40
     console.log("");
41 41
     console.log("Example:")
42 42
     console.log("nodemailer --host=smtp.gmail.com --port=465 --secure=true --user=\"myuser@gmail.com\" --pass=\"mypass\" --from=\"myuser@gmail.com\" --to=\"target@example.com\" --subject=\"test\" --text=\"hello world!\"");
@@ -62,7 +62,7 @@ var transportType = (argv.transport || configFile.transport || process.env.NODE
62 62
     secret = argv.secret || configFile.secret || process.env.NODEMAILER_SECRET;
63 63
 
64 64
 if(!transportType){
65  
-    transportType = host?"smtp":"sendmail";
  65
+    transportType = host?"smtp": (key?"ses":"sendmail");
66 66
 }
67 67
 
68 68
 secure = ["false", "null", "0", "undefined"].indexOf(secure)>=0 ? false : !!secure;
@@ -112,11 +112,11 @@ if(attachments.length){
112 112
 }
113 113
 
114 114
 if(argv.textFile){
115  
-    argv.text = require("fs").readFileSync(argv.textFile, "utf-8");
  115
+    text = require("fs").readFileSync(argv.textFile, "utf-8");
116 116
 }
117 117
 
118 118
 if(argv.htmlFile){
119  
-    argv.html = require("fs").readFileSync(argv.htmlFile, "utf-8");
  119
+    html = require("fs").readFileSync(argv.htmlFile, "utf-8");
120 120
 }
121 121
 
122 122
 if(argv.stdin){
2  package.json
... ...
@@ -1,7 +1,7 @@
1 1
 {
2 2
     "name": "nodemailer",
3 3
     "description": "Easy to use module to send e-mails, supports unicode and SSL/TLS",
4  
-    "version": "0.3.24",
  4
+    "version": "0.3.25",
5 5
     "author" : "Andris Reinman",
6 6
     "maintainers":[
7 7
         {

0 notes on commit 6356572

Please sign in to comment.
Something went wrong with that request. Please try again.