Update SMTP setup instructions
Add smtp port and tls options Use /user/ path for shorthand sharing link
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user