Skip to content

Commit

Permalink
Command line file inclusion fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Andris Reinman committed Sep 4, 2012
1 parent 017c231 commit 6356572
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions bin/nodemailer
Expand Up @@ -36,7 +36,7 @@ if(argv.help){
console.log(" --textFile=[path] Plain text mail body from a file");
console.log(" --htmlFile=[path] HTML mail body from a file");
console.log(" --stdin=[target] Read \"text\" or \"html\" from stdin");
console.log(" --attachments=[pathlist] Comma separated list of file paths");
console.log(" --attachments=[pathlist] Comma separated list of file paths");
console.log("");
console.log("Example:")
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!\"");
Expand All @@ -62,7 +62,7 @@ var transportType = (argv.transport || configFile.transport || process.env.NODE
secret = argv.secret || configFile.secret || process.env.NODEMAILER_SECRET;

if(!transportType){
transportType = host?"smtp":"sendmail";
transportType = host?"smtp": (key?"ses":"sendmail");
}

secure = ["false", "null", "0", "undefined"].indexOf(secure)>=0 ? false : !!secure;
Expand Down Expand Up @@ -112,11 +112,11 @@ if(attachments.length){
}

if(argv.textFile){
argv.text = require("fs").readFileSync(argv.textFile, "utf-8");
text = require("fs").readFileSync(argv.textFile, "utf-8");
}

if(argv.htmlFile){
argv.html = require("fs").readFileSync(argv.htmlFile, "utf-8");
html = require("fs").readFileSync(argv.htmlFile, "utf-8");
}

if(argv.stdin){
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "nodemailer",
"description": "Easy to use module to send e-mails, supports unicode and SSL/TLS",
"version": "0.3.24",
"version": "0.3.25",
"author" : "Andris Reinman",
"maintainers":[
{
Expand Down

0 comments on commit 6356572

Please sign in to comment.