Add domain to the config
This commit is contained in:
@ -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#
|
||||
|
@ -7,10 +7,11 @@
|
||||
#include <iomanip>
|
||||
#include <stdexcept>
|
||||
#include <pqxx/pqxx>
|
||||
#include <openssl/sha.h>
|
||||
#include "crow.h"
|
||||
#include "cpp/opportunisticsecuresmtpclient.hpp"
|
||||
#include "cpp/htmlmessage.hpp"
|
||||
#include <openssl/sha.h>
|
||||
#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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user