Skip to content

Commit

Permalink
Version 0.6.12
Browse files Browse the repository at this point in the history
Added 'mail_options' config param, for sending options directly to pixl-mail, such as SMTP auth, SSL, etc.
Fixes #17
  • Loading branch information
jhuckaby committed Apr 9, 2017
1 parent fd02cb4 commit ad33c8e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,20 @@ The hostname of your SMTP server, for sending mail. This can be set to `127.0.0

The port number to use when communicating with the SMTP server. The default is `25`.

### mail_options

Set specific mailer options, such as SMTP SSL and authentication, passed directly to [pixl-mail](https://www.npmjs.com/package/pixl-mail#smtp-options) (and then to [nodemailer-smtp-transport](https://www.npmjs.com/package/nodemailer-smtp-transport#usage)). Example:

```js
"mail_options": {
'secure', true,
'auth', { user: 'fsmith', pass: '12345' },
connectionTimeout: 10000, // milliseconds
greetingTimeout: 10000, // milliseconds
socketTimeout: 10000 // milliseconds
}
```

### secret_key

For multi-server setups, all your Cronicle servers need to share the same secret key. Any randomly generated string is fine.
Expand Down
1 change: 1 addition & 0 deletions lib/job.js
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,7 @@ module.exports = Class.create({

// construct mailer
var mail = new PixlMail( this.server.config.get('smtp_hostname'), this.server.config.get('smtp_port') || 25 );
mail.setOptions( this.server.config.get('mail_options') || {} );

// send it
mail.send( email_template, email_data, function(err, raw_email) {
Expand Down
1 change: 1 addition & 0 deletions lib/scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ module.exports = Class.create({

// construct mailer
var mail = new PixlMail( this.server.config.get('smtp_hostname'), this.server.config.get('smtp_port') || 25 );
mail.setOptions( this.server.config.get('mail_options') || {} );

// send it
mail.send( email_template, email_data, function(err, raw_email) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Cronicle",
"version": "0.6.11",
"version": "0.6.12",
"description": "A simple, distributed task scheduler and runner with a web based UI.",
"author": "Joseph Huckaby <[email protected]>",
"homepage": "https://github.com/jhuckaby/Cronicle",
Expand Down

0 comments on commit ad33c8e

Please sign in to comment.