Don't fail if template is not found and hope for the best
This commit is contained in:
@@ -20,7 +20,6 @@
|
|||||||
|
|
||||||
package io.kamax.mxisd.config.invite.sender;
|
package io.kamax.mxisd.config.invite.sender;
|
||||||
|
|
||||||
import io.kamax.mxisd.exception.ConfigurationException;
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@@ -122,10 +121,9 @@ public class EmailSenderConfig {
|
|||||||
log.warn("invite.sender.contentPath is empty! Will not send invites");
|
log.warn("invite.sender.contentPath is empty! Will not send invites");
|
||||||
} else {
|
} else {
|
||||||
File cp = new File(getContentPath()).getAbsoluteFile();
|
File cp = new File(getContentPath()).getAbsoluteFile();
|
||||||
|
log.info("Content path: {}", cp.getAbsolutePath());
|
||||||
if (!cp.exists() || !cp.isFile() || !cp.canRead()) {
|
if (!cp.exists() || !cp.isFile() || !cp.canRead()) {
|
||||||
throw new ConfigurationException("invite.sender.email.contentPath", getContentPath() + " does not exist, is not a file or cannot be read");
|
log.warn(getContentPath() + " does not exist, is not a file or cannot be read");
|
||||||
} else {
|
|
||||||
log.info("Content path: {}", cp.getAbsolutePath());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user