diff --git a/src/default-cavecomm.conf b/src/default-cavecomm.conf index d8119b5..4631418 100644 --- a/src/default-cavecomm.conf +++ b/src/default-cavecomm.conf @@ -7,7 +7,7 @@ # emailServerAddress= # sslCrtPath= # sslKeyPath= - +# domain= # Optional: {default} # emailServerPort={587} @@ -32,5 +32,6 @@ sslCrtPath=/media/sf_cavecommRemote/example.crt; sslKeyPath=/media/sf_cavecommRemote/example.key; +domain=192.168.56.1:18080; #configend# diff --git a/src/utilities.cpp b/src/utilities.cpp index ceb2fed..6c92d38 100644 --- a/src/utilities.cpp +++ b/src/utilities.cpp @@ -7,10 +7,11 @@ #include #include #include +#include #include "crow.h" #include "cpp/opportunisticsecuresmtpclient.hpp" #include "cpp/htmlmessage.hpp" -#include +#include "emailTemplateCollection.cpp" using namespace jed_utils::cpp; @@ -56,6 +57,7 @@ namespace Utilities { std::string emailAddressDisplay = "Cavecomm Automated Management System"; std::string sslCrtPath; std::string sslKeyPath; + std::string domain; /* * validates existence of mandatory variables in config @@ -68,7 +70,8 @@ namespace Utilities { || emailServerAddress.empty() || databaseConnectionString.empty() || sslCrtPath.empty() - || sslCrtPath.empty() + || sslKeyPath.empty() + || domain.empty() ) return 1; @@ -151,6 +154,10 @@ namespace Utilities { sslKeyPath = trimFromDelimiter(lineVector.at(1), ';'); continue; } + if (lineVector.at(0) == "domain") { + domain = trimFromDelimiter(lineVector.at(1), ';'); + continue; + } } } }