forked from community/device-mgt-core
Add mail sending feature as corrective action See merge request entgra/carbon-device-mgt!652corrective-policy
commit
f41bf699ec
@ -0,0 +1,60 @@
|
||||
/* Copyright (c) 2020, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
|
||||
*
|
||||
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
|
||||
* Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.wso2.carbon.device.mgt.common.configuration.mgt;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class CorrectiveActionConfig {
|
||||
|
||||
private List<String> mailReceivers;
|
||||
private String mailSubject;
|
||||
private String mailBody;
|
||||
private List<String> actionTypes;
|
||||
|
||||
public List<String> getMailReceivers() {
|
||||
return mailReceivers;
|
||||
}
|
||||
|
||||
public void setMailReceivers(List<String> mailReceivers) {
|
||||
this.mailReceivers = mailReceivers;
|
||||
}
|
||||
|
||||
public String getMailSubject() {
|
||||
return mailSubject;
|
||||
}
|
||||
|
||||
public void setMailSubject(String mailSubject) {
|
||||
this.mailSubject = mailSubject;
|
||||
}
|
||||
|
||||
public String getMailBody() {
|
||||
return mailBody;
|
||||
}
|
||||
|
||||
public void setMailBody(String mailBody) {
|
||||
this.mailBody = mailBody;
|
||||
}
|
||||
|
||||
public List<String> getActionTypes() {
|
||||
return actionTypes;
|
||||
}
|
||||
|
||||
public void setActionTypes(List<String> actionTypes) {
|
||||
this.actionTypes = actionTypes;
|
||||
}
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
#*
|
||||
Copyright (c) 2020, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
|
||||
|
||||
Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
|
||||
Version 2.0 (the "License"); you may not use this file except
|
||||
in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
*#
|
||||
<EmailConfig>
|
||||
<Subject>$mail-subject</Subject>
|
||||
<Body>
|
||||
<![CDATA[
|
||||
<html>
|
||||
<head>
|
||||
<title>Entgra IoT Server</title>
|
||||
</head>
|
||||
<body style="color: #666666; background-color:#cdcdcd; padding: 0px; margin: 0px;">
|
||||
<div style="background-color:#cdcdcd; font-length: 1em; font-family: Arial, Helvetica; line-height: 170%; color: #666666; padding: 20px 0px; margin: 0px;">
|
||||
<div style="width: 86%; max-width: 650px; padding: 2%; background-color: #ffffff; margin: auto; border-radius: 14px;">
|
||||
<div style="background-color: #ffebcc; line-height: 0px; border-top-left-radius: 10px; border-top-right-radius: 10px; padding: 10px;">
|
||||
<div style="display: inline-block; line-height: 0px;">
|
||||
<img alt="entgra" src="https://storage.googleapis.com/cdn-entgra/logo.png" height="50px" width="143px" />
|
||||
</div>
|
||||
</div>
|
||||
<div style="background-color: #ffffff; line-height: 170%; color: #666666; padding: 20px 25px;">
|
||||
<p style="font-length: 1em; font-family: Arial, Helvetica; line-height: 170%; color: #666666; margin: 5px 0px 20px;">
|
||||
Hi,
|
||||
</p>
|
||||
<div>
|
||||
<p style="font-length: 1em; font-family: Arial, Helvetica; line-height: 170%; color: #666666; margin: 20px 0px 5px;">
|
||||
$feature-code policy is violated in the following device.
|
||||
</p>
|
||||
<p style="font-size: 1em; font-family: Arial, Helvetica; line-height: 170%; color: #666666; margin: 5px 0px;"><b>Device Id: </b> $device-id</p>
|
||||
<p style="font-size: 1em; font-family: Arial, Helvetica; line-height: 170%; color: #666666; margin: 5px 0px;"><b>Device Name: </b> $device-name</p>
|
||||
<p style="font-size: 1em; font-family: Arial, Helvetica; line-height: 170%; color: #666666; margin: 5px 0px;"><b>Device Owner: </b> $device-owner</p>
|
||||
</div>
|
||||
<div>
|
||||
<p style="font-size: 1em; font-family: Arial, Helvetica; line-height: 170%; color: #666666; margin: 5px 0px;">$custom-mail-body</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p style="font-length: 1em; font-family: Arial, Helvetica; line-height: 170%; color: #666666; margin: 20px 0px 5px;">
|
||||
If you have any further questions, please reach out to us using your registered mail to
|
||||
<a href="bizdev-group@entgra.io"> bizdev-group@entgra.io.</a> Looking forward to working with you.
|
||||
</p>
|
||||
<p style="font-length: 1em; font-family: Arial, Helvetica; line-height: 170%; color: #666666; margin: 20px 0px 5px;">
|
||||
Best Regards,
|
||||
</p>
|
||||
<p style="font-size: 1em; font-family: Arial, Helvetica; line-height: 170%; color: #666666; margin: 5px 0px;">
|
||||
Entgra Administrator
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
]]>
|
||||
</Body>
|
||||
</EmailConfig>
|
Loading…
Reference in new issue