Skip to content

Commit

Permalink
Switch to Jakarta Angus Email Libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
C4J committed Oct 9, 2023
1 parent 930ac2d commit 3190d5c
Show file tree
Hide file tree
Showing 125 changed files with 386 additions and 123 deletions.
8 changes: 4 additions & 4 deletions b6Middleware/.classpath
Expand Up @@ -29,16 +29,16 @@
<classpathentry kind="lib" path="lib/poi/lib/SparseBitSet-1.2.jar"/>
<classpathentry kind="lib" path="lib/poi/auxiliary/pdfbox-2.0.26.jar"/>
<classpathentry kind="lib" path="lib/mqtt/org.eclipse.paho.client.mqttv3_1.2.3.jar"/>
<classpathentry kind="lib" path="lib/mail/commons-email-1.5.jar"/>
<classpathentry kind="lib" path="lib/mail/javax.activation-1.2.0.jar"/>
<classpathentry kind="lib" path="lib/mail/javax.mail.jar"/>
<classpathentry kind="lib" path="lib/poi/ooxml-lib/commons-compress-1.21.jar"/>
<classpathentry kind="lib" path="lib/poi/ooxml-lib/commons-logging-1.2.jar"/>
<classpathentry kind="lib" path="lib/poi/ooxml-lib/curvesapi-1.07.jar"/>
<classpathentry kind="lib" path="lib/poi/ooxml-lib/jakarta.activation-2.0.1.jar"/>
<classpathentry kind="lib" path="lib/poi/ooxml-lib/jakarta.xml.bind-api-3.0.1.jar"/>
<classpathentry kind="lib" path="lib/poi/ooxml-lib/xmlbeans-5.1.1.jar"/>
<classpathentry kind="lib" path="lib/poi/poi-ooxml-5.2.3.jar"/>
<classpathentry kind="lib" path="lib/poi/poi-ooxml-full-5.2.3.jar"/>
<classpathentry kind="lib" path="lib/mail/jakarta.mail-api-2.1.2.jar"/>
<classpathentry kind="lib" path="lib/mail/angus-mail-2.0.2.jar"/>
<classpathentry kind="lib" path="lib/mail/angus-activation-2.0.1.jar"/>
<classpathentry kind="lib" path="lib/mail/jakarta.activation-api-2.1.2.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
8 changes: 4 additions & 4 deletions b6Middleware/MANIFEST.MF
Expand Up @@ -2,9 +2,10 @@ Manifest-Version: 1.0
Main-Class: com.commander4j.mw.StartGUI
Class-Path: lib/log/log4j-api-2.20.0.jar
lib/log/log4j-core-2.20.0.jar
lib/mail/commons-email-1.5.jar
lib/mail/javax.activation-1.2.0.jar
lib/mail/javax.mail.jar
lib/mail/angus-activation-2.0.1.jar
lib/mail/angus-mail-2.0.2.jar
lib/mail/jakarta.activation-api-2.1.2.jar
lib/mail/jakarta.mail-api-2.1.2.jar
lib/mqtt/org.eclipse.paho.client.mqttv3_1.2.3.jar
lib/opencsv/lib/commons-beanutils-1.9.4.jar
lib/opencsv/lib/commons-lang3-3.12.0.jar
Expand All @@ -20,7 +21,6 @@ Class-Path: lib/log/log4j-api-2.20.0.jar
lib/poi/ooxml-lib/commons-compress-1.21.jar
lib/poi/ooxml-lib/commons-logging-1.2.jar
lib/poi/ooxml-lib/curvesapi-1.07.jar
lib/poi/ooxml-lib/jakarta.activation-2.0.1.jar
lib/poi/ooxml-lib/jakarta.xml.bind-api-3.0.1.jar
lib/poi/ooxml-lib/xmlbeans-5.1.1.jar
lib/poi/poi-5.2.3.jar
Expand Down
2 changes: 1 addition & 1 deletion b6Middleware/b6middleware.install4j
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<install4j version="10.0.6" transformSequenceNumber="10">
<directoryPresets config="./xslt/referenceData.xml" />
<application name="Commander4j Middleware" applicationId="1915-8055-3520-8512" mediaDir="../../../Distribution/java17/b6middleware4j" compression="9" shortName="c4jMiddleware" publisher="David Garratt" publisherWeb="http://www.commander4j.com" version="5.11" allPathsRelative="true" macVolumeId="ebde9226275d23ed" javaMinVersion="17" javaMaxVersion="17">
<application name="Commander4j Middleware" applicationId="1915-8055-3520-8512" mediaDir="../../../Distribution/java17/b6middleware4j" compression="9" shortName="c4jMiddleware" publisher="David Garratt" publisherWeb="http://www.commander4j.com" version="5.20" allPathsRelative="true" macVolumeId="ebde9226275d23ed" javaMinVersion="17" javaMaxVersion="17">
<languages skipLanguageSelection="true">
<additionalLanguages>
<language id="da" />
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/Interface/Mapping/Map.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/Interface/Mapping/Maps.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/Transformation/XSLT.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/Transformation/concat$1.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/Transformation/concat.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/Transformation/formatDate$1.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/Transformation/formatDate.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/Transformation/nvl$1.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/Transformation/nvl.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/Transformation/padEAN$1.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/Transformation/padEAN.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/Transformation/padVariant$1.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/Transformation/padVariant.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/Transformation/subString$1.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/Transformation/subString.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/Transformation/trim$1.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/Transformation/trim.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/email/Email.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/email/EmailQueue.class
Binary file not shown.
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/email/SendEmail.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/email/distributionList.class
Binary file not shown.
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/gui/JList4j.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/gui/JListData.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/gui/JListRenderer.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/idoc/ConfigData.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/idoc/DataSegment.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/idoc/IdocParser.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/idoc/OutputData.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/mw/StartGUI$1.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/mw/StartGUI$2.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/mw/StartGUI$3.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/mw/StartGUI$4.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/mw/StartGUI$5.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/mw/StartGUI$WindowListener.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/mw/StartGUI.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/mw/StartMain.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/mw/StartService.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/mw/StartTest.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/sys/Common.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/sys/FixedASCIIColumns.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/sys/FixedASCIIData.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/sys/MiddlewareConfig.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/thread/EmailThread.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/thread/LogArchiveThread.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/thread/StatusThread.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/util/JArchive.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/util/JFileIO.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/util/JFileLock.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/util/JImageIconLoader.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/util/JWait.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/util/JXMLDocument.class
Binary file not shown.
Binary file modified b6Middleware/bin/com/commander4j/util/Utility.class
Binary file not shown.
30 changes: 12 additions & 18 deletions b6Middleware/build.xml
Expand Up @@ -3,12 +3,12 @@
Any modifications will be overwritten.
To include a user specific buildfile here, simply create one in the same
directory with the processing instruction <?eclipse.ant.import?>
as the first entry and export the buildfile again. --><project basedir="." default="build" name="b5Middleware">
as the first entry and export the buildfile again. --><project basedir="." default="build" name="b6Middleware">
<property environment="env"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="17"/>
<property name="source" value="17"/>
<path id="b5Middleware.classpath">
<path id="b6Middleware.classpath">
<pathelement location="bin"/>
<pathelement location="lib/poi/lib/commons-io-2.13.0.jar"/>
<pathelement location="lib/log/log4j-api-2.20.0.jar"/>
Expand All @@ -32,20 +32,20 @@
<pathelement location="lib/poi/lib/SparseBitSet-1.2.jar"/>
<pathelement location="lib/poi/auxiliary/pdfbox-2.0.26.jar"/>
<pathelement location="lib/mqtt/org.eclipse.paho.client.mqttv3_1.2.3.jar"/>
<pathelement location="lib/mail/commons-email-1.5.jar"/>
<pathelement location="lib/mail/javax.activation-1.2.0.jar"/>
<pathelement location="lib/mail/javax.mail.jar"/>
<pathelement location="lib/poi/ooxml-lib/commons-compress-1.21.jar"/>
<pathelement location="lib/poi/ooxml-lib/commons-logging-1.2.jar"/>
<pathelement location="lib/poi/ooxml-lib/curvesapi-1.07.jar"/>
<pathelement location="lib/poi/ooxml-lib/jakarta.activation-2.0.1.jar"/>
<pathelement location="lib/poi/ooxml-lib/jakarta.xml.bind-api-3.0.1.jar"/>
<pathelement location="lib/poi/ooxml-lib/xmlbeans-5.1.1.jar"/>
<pathelement location="lib/poi/poi-ooxml-5.2.3.jar"/>
<pathelement location="lib/poi/poi-ooxml-full-5.2.3.jar"/>
<pathelement location="lib/mail/jakarta.mail-api-2.1.2.jar"/>
<pathelement location="lib/mail/angus-mail-2.0.2.jar"/>
<pathelement location="lib/mail/angus-activation-2.0.1.jar"/>
<pathelement location="lib/mail/jakarta.activation-api-2.1.2.jar"/>
</path>
<path id="run.StartMain.classpath">
<path refid="b5Middleware.classpath"/>
<path refid="b6Middleware.classpath"/>
<pathelement location="lib/poi/lib/commons-io-2.13.0.jar"/>
<pathelement location="lib/log/log4j-api-2.20.0.jar"/>
<pathelement location="lib/log/log4j-core-2.20.0.jar"/>
Expand All @@ -68,23 +68,22 @@
<pathelement location="lib/poi/lib/SparseBitSet-1.2.jar"/>
<pathelement location="lib/poi/auxiliary/pdfbox-2.0.26.jar"/>
<pathelement location="lib/mqtt/org.eclipse.paho.client.mqttv3_1.2.3.jar"/>
<pathelement location="lib/mail/commons-email-1.5.jar"/>
<pathelement location="lib/mail/javax.activation-1.2.0.jar"/>
<pathelement location="lib/mail/javax.mail.jar"/>
<pathelement location="lib/poi/ooxml-lib/commons-compress-1.21.jar"/>
<pathelement location="lib/poi/ooxml-lib/commons-logging-1.2.jar"/>
<pathelement location="lib/poi/ooxml-lib/curvesapi-1.07.jar"/>
<pathelement location="lib/poi/ooxml-lib/jakarta.activation-2.0.1.jar"/>
<pathelement location="lib/poi/ooxml-lib/jakarta.xml.bind-api-3.0.1.jar"/>
<pathelement location="lib/poi/ooxml-lib/xmlbeans-5.1.1.jar"/>
<pathelement location="lib/poi/poi-ooxml-5.2.3.jar"/>
<pathelement location="lib/poi/poi-ooxml-full-5.2.3.jar"/>
<pathelement location="lib/mail/jakarta.mail-api-2.1.2.jar"/>
<pathelement location="lib/mail/angus-mail-2.0.2.jar"/>
<pathelement location="lib/mail/angus-activation-2.0.1.jar"/>
<pathelement location="lib/mail/jakarta.activation-api-2.1.2.jar"/>
</path>
<target name="init">
<mkdir dir="bin"/>
<copy includeemptydirs="false" todir="bin">
<fileset dir="src">
<exclude name="**/*.launch"/>
<exclude name="**/*.java"/>
</fileset>
</copy>
Expand All @@ -99,7 +98,7 @@
<echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}">
<src path="src"/>
<classpath refid="b5Middleware.classpath"/>
<classpath refid="b6Middleware.classpath"/>
</javac>
</target>
<target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/>
Expand All @@ -108,9 +107,4 @@
<classpath refid="run.StartMain.classpath"/>
</java>
</target>
<target name="StartGUI">
<java classname="com.commander4j.mw.StartGUI" failonerror="true" fork="yes">
<classpath refid="run.StartGUI.classpath"/>
</java>
</target>
</project>
Binary file modified b6Middleware/c4jMiddleware.jar
Binary file not shown.
Binary file added b6Middleware/lib/mail/angus-activation-2.0.1.jar
Binary file not shown.
Binary file added b6Middleware/lib/mail/angus-mail-2.0.2.jar
Binary file not shown.
Binary file removed b6Middleware/lib/mail/commons-email-1.5.jar
Binary file not shown.
Binary file not shown.
Binary file added b6Middleware/lib/mail/jakarta.mail-api-2.1.2.jar
Binary file not shown.
Binary file removed b6Middleware/lib/mail/javax.activation-1.2.0.jar
Binary file not shown.
Binary file removed b6Middleware/lib/mail/javax.mail.jar
Binary file not shown.
Binary file not shown.
193 changes: 99 additions & 94 deletions b6Middleware/src/com/commander4j/email/SendEmail.java
Expand Up @@ -5,15 +5,23 @@
import java.util.HashMap;
import java.util.Properties;

import org.apache.commons.mail.DefaultAuthenticator;
import org.apache.commons.mail.EmailAttachment;
import org.apache.commons.mail.MultiPartEmail;
import org.apache.logging.log4j.Logger;

import com.commander4j.sys.Common;
import com.commander4j.util.JXMLDocument;
import com.commander4j.util.Utility;

import jakarta.mail.Authenticator;
import jakarta.mail.Message;
import jakarta.mail.PasswordAuthentication;
import jakarta.mail.Session;
import jakarta.mail.Transport;
import jakarta.mail.internet.InternetAddress;
import jakarta.mail.internet.MimeBodyPart;
import jakarta.mail.internet.MimeMessage;
import jakarta.mail.internet.MimeMultipart;
import jakarta.mail.Multipart;

public class SendEmail
{
Logger logger = org.apache.logging.log4j.LogManager.getLogger((SendEmail.class));
Expand Down Expand Up @@ -89,126 +97,123 @@ public synchronized boolean Send(String distributionID, String subject, String m

if (distList.get(distributionID).enabled.equals("Y"))
{
String emailKey = "[" + distributionID + "] - [" + subject + "]";
logger.debug(emailKey);
String emailKey = "[" + distributionID + "] - [" + subject + "]";
logger.debug(emailKey);

Calendar lastSent;
Calendar now = Calendar.getInstance();

Boolean okToSend = false;
Calendar lastSent = Calendar.getInstance();
Calendar now = Calendar.getInstance();

if (emailLog.containsKey(emailKey))
{
lastSent = emailLog.get(emailKey);
}
else
{
okToSend = true;
lastSent = now;
emailLog.put(emailKey, lastSent);
}
if (emailLog.containsKey(emailKey))
{
lastSent = emailLog.get(emailKey);
}
else
{
lastSent.add(Calendar.DATE, -1);
emailLog.put(emailKey, lastSent);
}


long seconds = (now.getTimeInMillis() - lastSent.getTimeInMillis()) / 1000;

long ageInMins = seconds/60;

logger.debug("Last email to " + emailKey + " was at " + util.getISODateStringFromCalendar(lastSent));
logger.debug("Current time is " + util.getISODateStringFromCalendar(now));

logger.debug("Minutes since last email to " + emailKey + " is " + String.valueOf(ageInMins));

if (ageInMins >= distList.get(distributionID).maxFrequencyMins)
{
okToSend = true;
emailLog.put(emailKey, now);
logger.debug("Email allowed");
}
else
{
//okToSend = false;
logger.debug("Email suppressed - too frequent");
}
long seconds = (now.getTimeInMillis() - lastSent.getTimeInMillis()) / 1000;

if (okToSend)
{
EmailAttachment attachment = new EmailAttachment();
MultiPartEmail email = new MultiPartEmail();
try
{
if (smtpProperties.get("mail.smtp.auth").toString().toLowerCase().equals("true"))
{
logger.debug("Email authentication required");
email.setAuthenticator(new DefaultAuthenticator(smtpProperties.get("mail.smtp.user").toString(), smtpProperties.get("mail.smtp.password").toString()));
email.setStartTLSEnabled(true);
}
else
{
logger.debug("Email No Authentication specified");
}
long ageInMins = seconds / 60;

logger.debug("Last email to " + emailKey + " was at " + util.getISODateStringFromCalendar(lastSent));
logger.debug("Current time is " + util.getISODateStringFromCalendar(now));

email.getMailSession().getProperties().putAll(smtpProperties);
logger.debug("Minutes since last email to " + emailKey + " is " + String.valueOf(ageInMins));

String emails = distList.get(distributionID).addressList;
String[] emailArray = emails.split(",");
emails = null;
if (ageInMins >= distList.get(distributionID).maxFrequencyMins)
{

if (emailArray.length > 0)
emailLog.put(emailKey, now);
logger.debug("Email frequency permitted.");

try
{

for (int x = 0; x < emailArray.length; x++)
Properties propAuth = new Properties();
Properties propNoAuth = new Properties();

propAuth.putAll(smtpProperties);
propNoAuth.putAll(smtpProperties);

Session authenticatedSession = Session.getInstance(propAuth, new Authenticator()
{
email.addTo(emailArray[x].toLowerCase(), "");
logger.debug("Email To: " + emailArray[x].toLowerCase());
}
@Override
protected PasswordAuthentication getPasswordAuthentication()
{
return new PasswordAuthentication(smtpProperties.get("mail.smtp.user").toString(), smtpProperties.get("mail.smtp.password").toString());
}
});

emailArray = null;
propNoAuth.put("mail.smtp.user","");
propNoAuth.put("mail.smtp.password","");


try
Session unauthenticatedSession = Session.getInstance(propAuth,null);

MimeMessage message;

if (smtpProperties.get("mail.smtp.auth").toString().toLowerCase().equals("true"))
{
logger.debug("Email authentication required");
message = new MimeMessage(authenticatedSession);
}
else
{
logger.debug("Email no authentication required");
message = new MimeMessage(unauthenticatedSession);
}

email.setFrom(smtpProperties.get("mail.smtp.from").toString(), "");
email.setSubject(subject);
email.setMsg(messageText);
String emails = distList.get(distributionID).addressList;

// add the attachment
if (filename.equals("") == false)
{
logger.debug("Email add attachment [" + util.getFilenameFromPath(filename) + "]");
logger.debug("Email To: " + emails);
message.addRecipients(Message.RecipientType.TO, InternetAddress.parse(emails));

attachment.setPath(filename);
attachment.setDisposition(EmailAttachment.ATTACHMENT);
attachment.setDescription(filename);
attachment.setName(util.getFilenameFromPath(filename));
email.attach(attachment);
}
message.setFrom(new InternetAddress(smtpProperties.get("mail.smtp.from").toString()));

// send the email
logger.debug("Email begin send...");
message.setSubject(subject);

email.send();
MimeBodyPart mimeBodyPart = new MimeBodyPart();

logger.debug("Email sent successfully");
// mimeBodyPart.setContent(messageText, "text/html;
// charset=utf-8");
mimeBodyPart.setText(messageText, "utf-8");

}
catch (Exception mex)
Multipart multipart = new MimeMultipart();
multipart.addBodyPart(mimeBodyPart);

if (filename.equals("") == false)
{
logger.error("Error sending email : " + mex.getMessage());
result = false;
logger.debug("Email add attachment [" + util.getFilenameFromPath(filename) + "]");

MimeBodyPart attachmentBodyPart = new MimeBodyPart();
attachmentBodyPart.attachFile(new File(filename));
attachmentBodyPart.setDescription(filename);

multipart.addBodyPart(attachmentBodyPart);

}
message.setContent(multipart);

logger.debug("Sending email");
Transport.send(message);
logger.debug("Email sent");

message = null;
}
catch (Exception ex)
{
logger.error("Error encountered sending email [" + ex.getMessage() + "]");
}

}
catch (Exception mex)
else
{
logger.error("Error sending email : " + mex.getMessage());
result = false;
// okToSend = false;
logger.debug("Email suppressed - too frequent");
}

attachment = null;
email = null;
}
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion b6Middleware/src/com/commander4j/mw/StartMain.java
Expand Up @@ -16,7 +16,7 @@ public class StartMain

Logger logger = org.apache.logging.log4j.LogManager.getLogger((StartMain.class));
public MiddlewareConfig cfg;
public static String version = "5.11";
public static String version = "5.20";
Boolean running = false;
LogArchiveThread archiveLog;
StatusThread statusthread;
Expand Down
2 changes: 1 addition & 1 deletion b6Middleware/xml/config/email.xml
Expand Up @@ -53,7 +53,7 @@

<!-- Distribution Lists are referred to within message mapping Config.xml -->

<distributionList id="Monitor" enabled="Y" maxFrequencyMins="0">
<distributionList id="Monitor" enabled="Y" maxFrequencyMins="5">
<toAddressList>dummy1@gmail.com,dummy2@gmail.com</toAddressList>
</distributionList>

Expand Down

0 comments on commit 3190d5c

Please sign in to comment.