Permalink
Browse files

cleaned up lib some more, added npm install instructions

  • Loading branch information...
1 parent a7a5b25 commit b096fb71e327c02375a8e18d29b762800ee9c30f @Marak committed Aug 5, 2010
Showing with 62 additions and 31 deletions.
  1. +23 −0 MIT-LICENSE
  2. +21 −15 Readme.md
  3. +14 −0 demo.js
  4. +1 −13 { → lib}/node_mailer.js
  5. +3 −3 package.json
View
23 MIT-LICENSE
@@ -0,0 +1,23 @@
+Copyright (c) 2009 Marak Squires - 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
+restriction, including without limitation the rights to use,
+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
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
View
36 Readme.md
@@ -1,20 +1,26 @@
<img src = "http://imgur.com/5Ol90.png"/><br/>
###send emails from node.js to your smtp server, simple as cake.
+### Installing npm (node package manager)
+
+ curl http://npmjs.org/install.sh | sh
+
+### Installing say.js
+
+ npm install mailer
+
# USAGE
+ var email = require("mailer");
- var email = require("./node_mailer");
-
- email.send({
- host : "localhost", // smtp server hostname
- port : "25", // smtp server port
- domain : "localhost", // domain used by client to identify itself to server
- authentication : "login", // auth login is supported; anything else is no auth
- username : "dXNlcm5hbWU=", // Base64 encoded username
- password : "cGFzc3dvcmQ=", // Base64 encoded password
- to : "marak.squires@gmail.com",
- from : "obama@whitehouse.gov",
- subject : "node_mailer test email",
- body : "hello this is a test email from the node_mailer"
- });
-
+ email.send({
+ host : "localhost", // smtp server hostname
+ port : "25", // smtp server port
+ domain : "localhost", // domain used by client to identify itself to server
+ authentication : "login", // auth login is supported; anything else is no auth
+ username : "dXNlcm5hbWU=", // Base64 encoded username
+ password : "cGFzc3dvcmQ=", // Base64 encoded password
+ to : "marak.squires@gmail.com",
+ from : "obama@whitehouse.gov",
+ subject : "node_mailer test email",
+ body : "hello this is a test email from the node_mailer"
+ });
View
14 demo.js
@@ -0,0 +1,14 @@
+var email = require("mailer");
+
+email.send({
+ host : "localhost", // smtp server hostname
+ port : "25", // smtp server port
+ domain : "localhost", // domain used by client to identify itself to server
+ authentication : "login", // auth login is supported; anything else is no auth
+ username : "dXNlcm5hbWU=", // Base64 encoded username
+ password : "cGFzc3dvcmQ=", // Base64 encoded password
+ to : "marak.squires@gmail.com",
+ from : "obama@whitehouse.gov",
+ subject : "node_mailer test email",
+ body : "hello this is a test email from the node_mailer"
+});
View
14 node_mailer.js → lib/node_mailer.js
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009 Marak Squires - www.maraksquires.com
+/* Copyright (c) 2009 Marak Squires - 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
@@ -23,18 +23,6 @@ OTHER DEALINGS IN THE SOFTWARE.
*/
-/********* USAGE ***********
-
- var email = require("./node_mailer");
- email.send({
- to : "marak.squires@gmail.com",
- from : "obama@whitehouse.gov",
- subject : "node_mailer test email",
- body : "hello this is a test email from the node_mailer"
- });
-
-****************************/
-
var tcp = require('net');
var sys = require('sys');
View
6 package.json
@@ -1,12 +1,12 @@
{
"name": "mailer",
- "description": "send emails from node.js to an smtp server, simple as cake",
- "version": "0.1.0",
+ "description": "send emails from node.js to a smtp server, simple as cake",
+ "version": "0.2.0",
"author": "Marak Squires",
"repository": {
"type": "git",
"url": "http://github.com/Marak/node_mailer.git"
},
"engine": [ "node >=0.1.90" ],
- "main": "node_mailer"
+ "main": "lib/node_mailer"
}

0 comments on commit b096fb7

Please sign in to comment.