Update SMTP setup instructions

Add smtp port and tls options
Use /user/ path for shorthand sharing link
This commit is contained in:
Tankred Hase
2016-06-02 09:24:57 +02:00
parent 111581bb78
commit 1c6696e7a4
7 changed files with 21 additions and 13 deletions

View File

@@ -63,7 +63,7 @@ router.get('/api/v1/verify', function *() { // ?keyid=keyid&nonce=nonce
router.get('/api/v1/verifyRemove', function *() { // ?keyid=keyid&nonce=nonce
yield rest.verifyRemove(this);
});
router.get('/:email', function *() { // shorthand link for sharing
router.get('/user/:email', function *() { // shorthand link for sharing
yield rest.share(this);
});
@@ -103,6 +103,8 @@ function injectDependencies() {
email = new Email(nodemailer);
email.init({
host: process.env.SMTP_HOST || credentials.smtp.host,
port: process.env.SMTP_PORT || credentials.smtp.port,
secure: (process.env.SMTP_TLS || credentials.smtp.tls) === 'true',
auth: {
user: process.env.SMTP_USER || credentials.smtp.user,
pass: process.env.SMTP_PASS || credentials.smtp.pass

View File

@@ -47,8 +47,8 @@ class Email {
host: options.host,
port: options.port || 465,
auth: options.auth,
secure: options.secure || true,
requireTLS: options.requireTLS || true
secure: (options.secure !== undefined) ? options.secure : true,
requireTLS: (options.secure !== undefined) ? options.secure : true
});
this._sender = options.sender;
}