Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ytanay committed Feb 25, 2014
1 parent 11970da commit 9210d7a
Showing 1 changed file with 35 additions and 4 deletions.
39 changes: 35 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,51 @@
# ultrases [![Build Status](https://secure.travis-ci.org/ytanay/ultrases.png?branch=master)](http://travis-ci.org/ytanay/ultrases)

Stupidly easy mailing with Amazon AWS SES (Simple Email Service)
Dead simple email dispatch with AWS SES (Amazon Simple Email Service) with templates!

## Getting Started
Install the module with: `npm install ultrases`

```javascript
var UltraSES = require('ultrases');
var mailer = new UltraSES({...}); // "awesome"
var mailer = new UltraSES({...});
```

## Documentation
_(Coming soon)_

### Setup
Start by creating a new instance of UltraSES. Pass your access key for AWS in this fashion:
```javascript
var mailer = new UltraSES({
aws: {
accessKeyId: 'LOOKATHESEUPERCASELETTERANDNUMBERS123',
secretAccessKey: 'shhhhits/asecret+42'
}
}
```
You can also supply defaults for sending emails (for example, the "source" address)
```javascript
var mailer = new UltraSES({
aws: {...},
defaults: {from: 'Team Octocat <[email protected]>'}
}
```
You can always override these defaults when you send the actual emails, of course.
### Sending a simple email
The basic method for sending email is ```mailer.sendText(email, text, done)``` and it takes (as you can probably see), 3 arguments):
```javascript
mailer.sendText({to: '[email protected]', subject: 'Hello from Octoland!'}, 'Look at this fantastic email body!', function(err){
if(err) throw err;
console.log('email sent!');
}
```
Some notes:
+ The emails will be sent from [email protected]__, because we set that as a default during initialization.
+ You may include the message body in the "email" object instead of as an extra argument (i.e. ```{subject: '...', text: '..'}```)
## Examples
_(Coming soon)_
_(In a bit)_
## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).
Expand Down

0 comments on commit 9210d7a

Please sign in to comment.