Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postmark

Package Overview
Dependencies
Maintainers
0
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postmark - npm Package Compare versions

Comparing version 0.0.5 to 0.1.0

._changelog.md

2

._package.json

@@ -1,4 +0,4 @@

Mac OS X  2��ATTRqc���"�"com.macromates.caret{
Mac OS X  2��ATTR�����"�"com.macromates.caret{
column = 20;
line = 3;
}

@@ -1,8 +0,3 @@

var request;
try {
request = require("request"); // use NPM installed if available.
} catch(e) { // resort to vendored.
request = require("./vendor/request");
}
var sys = require("sys")
var http = require("http");
var sys = require("sys");

@@ -40,6 +35,2 @@ module.exports = (function (api_key, options) {

var postmark_uri = "http://api.postmarkapp.com/email"
if (options.ssl) {
postmark_uri = "https://api.postmarkapp.com/email";
}

@@ -51,3 +42,10 @@ postmark_headers = {

}
request({uri: postmark_uri, method: "POST", body: JSON.stringify(message), headers: postmark_headers}, function (error, response, body) {
var req = http.request({
host: "api.postmarkapp.com",
path: "/email",
method: "POST",
headers: postmark_headers,
port: (options.ssl ? 443 : 80)
}, function (error, response, body) {
if (response.statusCode == 401) {

@@ -63,4 +61,7 @@ throw("Incorrect Postmark API Key header")

});
req.write(JSON.stringify(message));
req.end();
}
}
});
{ "name" : "postmark"
, "description" : "Ridiculously Simple Email Sending From Node.js using http://www.postmarkapp.com"
, "tags" : ["email", "utility"]
, "version" : "0.0.5"
, "version" : "0.1.0"
, "author" : "Chris Williams <voodootikigod@gmail.com>"

@@ -12,6 +12,5 @@ , "main" : "./lib/postmark"

}
, "dependencies": { "request": "0.10.0" }
, "bugs" :
{ "web" : "http://github.com/voodootikigod/postmark.js/issues" }
, "engines" : ["node >=0.1.90"]
, "engines" : ["node >=0.4.0"]
}
# Postmark.js -- Simple Email Sending
Note: This was recently updated to run directly on node.js 0.4.0 so there are no other dependencies. If you were using this before, it should upgrade perfectly fine without any change.
Send emails with the greatest of ease! Now your node.js application can send emails through [Postmark](http://www.postmarkapp.com) using their HTTP API. To send any email, including attachments, all you need to do is this:

@@ -17,2 +20,20 @@

To send attachments with the email, use the following format:
<pre>
var postmark = require("postmark")("YOURAPIKEY");
postmark.send({
"From": "donotreply@example.com",
"To": "target@example.us",
"Subject": "Test",
"TextBody": "Test Message",
"Attachments": [{
"Content": File.readFileSync("./unicorns.jpg").toString('base64'),
"Name": "PrettyUnicorn.jpg",
"ContentType": "image/jpeg"
}]
});
</pre>
Enjoy sending.

@@ -28,27 +49,2 @@

* [Postmark](http://www.postmarkapp.com)
* [Request Library from @mikeal](http://github.com/mikeal/node-utils/tree/master/request/)
## License
(The MIT License)
Copyright (c) 2010 Chris Williams
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.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc