#include #include "at_sign.hpp" #include "logger/logger_set.hpp" namespace smtp::checker::errors::settings { bool AtSign::Check( std::string const& line ) const { std::string mask = R"([_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4}))"; auto result = std::regex_search( line, std::regex{mask} ); if(!result) { logger::LoggerSet::GetInstance()->LogError( GetMethodName(), "Error in mail note" ); } return result; } }