make email server an obj
This commit is contained in:
parent
6c4f78446b
commit
aeb44eb8ca
3 changed files with 6 additions and 8 deletions
|
@ -15,7 +15,9 @@ Open that pad in ANOTHER BROWSER then begin modifying, you should recieve an ema
|
||||||
fromName: "Etherpad SETTINGS FILE!",
|
fromName: "Etherpad SETTINGS FILE!",
|
||||||
fromEmail: "pad@etherpad.org",
|
fromEmail: "pad@etherpad.org",
|
||||||
urlToPads: "http://beta.etherpad.org/p/", // urlToPads = The URL to your pads note the trailing /
|
urlToPads: "http://beta.etherpad.org/p/", // urlToPads = The URL to your pads note the trailing /
|
||||||
smtpHostname: "127.0.0.1"
|
emailServer: { // See https://github.com/eleith/emailjs for settings
|
||||||
|
host: "127.0.0.1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -23,8 +25,6 @@ Open that pad in ANOTHER BROWSER then begin modifying, you should recieve an ema
|
||||||
* stop the ui prompting if already subscribed
|
* stop the ui prompting if already subscribed
|
||||||
* Clean up all code
|
* Clean up all code
|
||||||
* Stop it emailing me if I'm already on the pad
|
* Stop it emailing me if I'm already on the pad
|
||||||
* Re-enable the pop up
|
|
||||||
* Allow for various SMTP auth / connectivity types
|
|
||||||
|
|
||||||
# FUTURE VERSIONS TODO
|
# FUTURE VERSIONS TODO
|
||||||
* v2 - Get the modified contents from the API HTML diff and append that to the Email and make the email from the server HTML not plain text
|
* v2 - Get the modified contents from the API HTML diff and append that to the Email and make the email from the server HTML not plain text
|
||||||
|
|
|
@ -28,7 +28,7 @@ function init(){
|
||||||
if(clientHasAlreadyRegistered()){ // if the client has already registered for emails on this pad.
|
if(clientHasAlreadyRegistered()){ // if the client has already registered for emails on this pad.
|
||||||
// showAlreadyRegistered(); // client has already registered, let em know..
|
// showAlreadyRegistered(); // client has already registered, let em know..
|
||||||
}else{
|
}else{
|
||||||
// askClientToEnterEmail(); // ask the client to register TODO uncomment me for a pop up
|
askClientToEnterEmail(); // ask the client to register TODO uncomment me for a pop up
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,15 +13,13 @@ var staleTime = pluginSettings.staleTime || 30000;
|
||||||
var fromName = pluginSettings.fromName || "Etherpad";
|
var fromName = pluginSettings.fromName || "Etherpad";
|
||||||
var fromEmail = pluginSettings.fromEmail || "pad@etherpad.org";
|
var fromEmail = pluginSettings.fromEmail || "pad@etherpad.org";
|
||||||
var urlToPads = pluginSettings.urlToPads || "http://beta.etherpad.org/p/";
|
var urlToPads = pluginSettings.urlToPads || "http://beta.etherpad.org/p/";
|
||||||
var smtpHostname = pluginSettings.smtpHostname || "127.0.0.1";
|
var emailServer = pluginSettings.emailServer || {host:"127.0.0.1"};
|
||||||
|
|
||||||
// A timer object we maintain to control how we send emails
|
// A timer object we maintain to control how we send emails
|
||||||
var timers = {};
|
var timers = {};
|
||||||
|
|
||||||
// Connect to the email server
|
// Connect to the email server
|
||||||
var server = email.server.connect({
|
var server = email.server.connect(emailServer);
|
||||||
host: smtpHostname,
|
|
||||||
});
|
|
||||||
|
|
||||||
exports.padUpdate = function (hook_name, _pad) {
|
exports.padUpdate = function (hook_name, _pad) {
|
||||||
var pad = _pad.pad;
|
var pad = _pad.pad;
|
||||||
|
|
Loading…
Reference in a new issue