some code additions to help debug Casey's issues with the mail gateway
This commit is contained in:
21
samples/debug.js
Normal file
21
samples/debug.js
Normal file
@@ -0,0 +1,21 @@
|
||||
// The contents of this file are subject to the Mozilla Public License Version 1.1
|
||||
// (the "License"); you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
|
||||
// WARRANTY OF ANY KIND, either express or implied. See the License for the specific
|
||||
// language governing rights and limitations under the License.
|
||||
//
|
||||
// The Original Code is the Venice Web Communities System - Generic Mail Gateway.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
|
||||
// for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
|
||||
// Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
|
||||
importPackage(Packages.com.silverwrist.mailgate);
|
||||
|
||||
// get the message, dump it
|
||||
message = bsf.lookupBean("message");
|
||||
message.dump();
|
||||
29
samples/debug.properties
Normal file
29
samples/debug.properties
Normal file
@@ -0,0 +1,29 @@
|
||||
# The contents of this file are subject to the Mozilla Public License Version 1.1
|
||||
# (the "License"); you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
|
||||
# WARRANTY OF ANY KIND, either express or implied. See the License for the specific
|
||||
# language governing rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Venice Web Communities System - Generic Mail Gateway.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
|
||||
# for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
|
||||
# Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
# The script to be run by the gateway for each received message.
|
||||
mailgate.script=debug.js
|
||||
|
||||
# Temporary directory for script engines.
|
||||
mailgate.script.tmpdir=/tmp
|
||||
|
||||
# Configuration parameters
|
||||
# (none)
|
||||
|
||||
# Properties used by the mail session object.
|
||||
mail.transport.protocol=smtp
|
||||
mail.smtp.host=localhost
|
||||
|
||||
3
samples/debug.sh
Executable file
3
samples/debug.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
exec java -cp "mailgate.jar:bsf.jar:js.jar:jacl.jar:tcljava.jar:xmlrpc.jar" \
|
||||
com.silverwrist.mailgate.Main debug.properties
|
||||
@@ -45,6 +45,7 @@ my_topic = lib.castInteger(lib.getConfigParam("topic"));
|
||||
parms.add(my_topic);
|
||||
parms.add(message.subject);
|
||||
parms.add(lib.castString(text));
|
||||
parms.add("email");
|
||||
ndx = lib.castInteger(rpc.execute("venice:conferencing.topic.postMessage",parms));
|
||||
|
||||
if (message.hasAttachments())
|
||||
@@ -61,6 +62,7 @@ if (message.hasAttachments())
|
||||
parms.add(my_topic);
|
||||
parms.add(message.subject);
|
||||
parms.add(lib.castString(new_text));
|
||||
parms.add("email");
|
||||
ndx = lib.castInteger(rpc.execute("venice:conferencing.topic.postMessage",parms));
|
||||
|
||||
} // end if
|
||||
|
||||
Reference in New Issue
Block a user