make email server an obj

This commit is contained in:
John McLear 2013-01-31 21:30:48 +00:00
parent 6c4f78446b
commit aeb44eb8ca
3 changed files with 6 additions and 8 deletions

View file

@ -15,7 +15,9 @@ Open that pad in ANOTHER BROWSER then begin modifying, you should recieve an ema
fromName: "Etherpad SETTINGS FILE!",
fromEmail: "pad@etherpad.org",
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
* Clean up all code
* 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
* 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

View file

@ -28,7 +28,7 @@ function init(){
if(clientHasAlreadyRegistered()){ // if the client has already registered for emails on this pad.
// showAlreadyRegistered(); // client has already registered, let em know..
}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
}
}
}

View file

@ -13,15 +13,13 @@ var staleTime = pluginSettings.staleTime || 30000;
var fromName = pluginSettings.fromName || "Etherpad";
var fromEmail = pluginSettings.fromEmail || "pad@etherpad.org";
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
var timers = {};
// Connect to the email server
var server = email.server.connect({
host: smtpHostname,
});
var server = email.server.connect(emailServer);
exports.padUpdate = function (hook_name, _pad) {
var pad = _pad.pad;