1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
From 1d097f5df898fc1be12bcf793aab8c000903c03b Mon Sep 17 00:00:00 2001
From: claiff <claiff@mail.ru>
Date: Thu, 20 Oct 2022 16:29:32 +0300
Subject: [PATCH] smtp disable from field
---
redfish-core/lib/smtp.hpp | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/redfish-core/lib/smtp.hpp b/redfish-core/lib/smtp.hpp
index 83bbf9b5..16e3898a 100644
--- a/redfish-core/lib/smtp.hpp
+++ b/redfish-core/lib/smtp.hpp
@@ -33,7 +33,7 @@ namespace redfish
return function_with_parameters.substr( ZERO_POSITION, position );
}
- inline void SendMail( std::string const& from, std::string const& subject,
+ inline void SendMail( std::string const& subject,
std::string const& text, std::shared_ptr<bmcweb::AsyncResp> const& asyncResp )
{
static const std::string SEND_MAIL_METHOD_NAME = "SendMail";
@@ -56,7 +56,6 @@ namespace redfish
},
SERVICE_PATH, OBJECT_MESSENGER_PATH, INTERFACE_MESSENGER_PATH,
SEND_MAIL_METHOD_NAME,
- from,
subject,
text);
}
@@ -247,7 +246,6 @@ namespace redfish
const std::string& params)
{
static constexpr std::string_view SEND_MAIL_METHOD_NAME = "SendMail";
- static constexpr std::string_view FROM_FIELD = "from";
static constexpr std::string_view SUBJECT_FIELD = "subject";
static constexpr std::string_view TEXT_FIELD = "text";
@@ -262,16 +260,15 @@ namespace redfish
return;
}
- std::string from, subject, text;
+ std::string subject, text;
if (!json_util::readJsonPatch(req, asyncResp->res,
- FROM_FIELD, from,
SUBJECT_FIELD, subject,
TEXT_FIELD, text))
{
asyncResp->res.jsonValue["result"] = false;
return;
}
- smtp::SendMail(from, subject, text, asyncResp);
+ smtp::SendMail(subject, text, asyncResp);
return;
});
@@ -286,8 +283,6 @@ namespace redfish
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const std::string& params)
{
-
-
static constexpr std::string_view GET_SETTINGS_METHOD_NAME = "GetSettings";
static constexpr std::string_view SET_SETTINGS_METHOD_NAME = "SetSettings";
|