Implement a way to get/set the nodemailer object (has an entries for contact, feedbac...
[ndcode_site.git] / _config / site.jst
index 4caff7d..39cd99f 100644 (file)
@@ -1,6 +1,6 @@
 let assert = require('assert')
 let logjson = (await import('@ndcode/logjson')).default
-let NodeMailerCache = require('@ndcode/nodemailer_cache')
+//let NodeMailerCache = require('@ndcode/nodemailer_cache')
 let XDate = require('xdate')
 let ZettairCache = require('@ndcode/zettair_cache')
 
@@ -29,11 +29,11 @@ return async (resources, root, prev_site) => {
         }
       )
 
-      assert(this.nodemailer_cache === undefined)
-      this.nodemailer_cache = await this.resources.ref(
-        'nodemailer_cache',
-        async () => new NodeMailerCache(true)
-      )
+      //assert(this.nodemailer_cache === undefined)
+      //this.nodemailer_cache = await this.resources.ref(
+      //  'nodemailer_cache',
+      //  async () => new NodeMailerCache(true)
+      //)
 
       assert(this.zettair_cache === undefined)
       this.zettair_cache = await this.resources.ref(
@@ -52,8 +52,8 @@ return async (resources, root, prev_site) => {
       assert(this.database !== undefined)
       await this.resources.unref('database')
 
-      assert(this.nodemailer_cache !== undefined)
-      await this.resources.unref('nodemailer_cache')
+      //assert(this.nodemailer_cache !== undefined)
+      //await this.resources.unref('nodemailer_cache')
 
       assert(this.zettair_cache !== undefined)
       await this.resources.unref('zettair_cache')
@@ -80,17 +80,17 @@ return async (resources, root, prev_site) => {
         this.database_date = new_database_date
       }
 
-      assert(this.nodemailer_cache !== undefined)
-      this.nodemailer_cache.kick()
+      //assert(this.nodemailer_cache !== undefined)
+      //this.nodemailer_cache.kick()
 
       assert(this.zettair_cache !== undefined)
       this.zettair_cache.kick()
     }
 
-    // retrieves a particular email account (as a nodemailer transport)
-    get_nodemailer(pathname) {
-      return /*await*/ this.nodemailer_cache.get(this.root + pathname)
-    }
+    //// retrieves a particular email account (as a nodemailer transport)
+    //get_nodemailer(pathname) {
+    //  return /*await*/ this.nodemailer_cache.get(this.root + pathname)
+    //}
 
     // retrieves a particular search index (node.js wrapper of a zettair object)
     get_zettair(pathname) {