2021-09-08 17:13:09 +00:00
< template >
< div class = "mb-3" >
< label for = "hostname" class = "form-label" > { { $t ( "Hostname" ) } } < / label >
< input id = "hostname" v-model = "$parent.notification.smtpHost" type="text" class="form-control" required >
< / div >
< div class = "mb-3" >
< label for = "port" class = "form-label" > { { $t ( "Port" ) } } < / label >
< input id = "port" v-model = "$parent.notification.smtpPort" type="number" class="form-control" required min="0" max="65535" step="1" >
< / div >
< div class = "mb-3" >
< label for = "secure" class = "form-label" > Secure < / label >
< select id = "secure" v-model = "$parent.notification.smtpSecure" class="form-select" >
2021-09-21 05:02:41 +00:00
< option :value = "false" > { { $t ( "secureOptionNone" ) } } < / option >
< option :value = "true" > { { $t ( "secureOptionTLS" ) } } < / option >
2021-09-08 17:13:09 +00:00
< / select >
< / div >
< div class = "mb-3" >
< div class = "form-check" >
< input id = "ignore-tls-error" v-model = "$parent.notification.smtpIgnoreTLSError" class="form-check-input" type="checkbox" value="" >
< label class = "form-check-label" for = "ignore-tls-error" >
2021-09-21 05:02:41 +00:00
{ { $t ( "Ignore TLS Error" ) } }
2021-09-08 17:13:09 +00:00
< / label >
< / div >
< / div >
< div class = "mb-3" >
< label for = "username" class = "form-label" > { { $t ( "Username" ) } } < / label >
< input id = "username" v-model = "$parent.notification.smtpUsername" type="text" class="form-control" autocomplete="false" >
< / div >
< div class = "mb-3" >
< label for = "password" class = "form-label" > { { $t ( "Password" ) } } < / label >
2021-09-13 22:36:37 +00:00
< HiddenInput id = "password" v-model = "$parent.notification.smtpPassword" :required="false" autocomplete="one-time-code" > < / HiddenInput >
2021-09-08 17:13:09 +00:00
< / div >
< div class = "mb-3" >
2021-09-21 05:02:41 +00:00
< label for = "from-email" class = "form-label" > { { $t ( "From Email" ) } } < / label >
2021-09-08 17:13:09 +00:00
< input id = "from-email" v-model = "$parent.notification.smtpFrom" type="text" class="form-control" required autocomplete="false" placeholder=""Uptime Kuma" <example@kuma.pet>" >
< div class = "form-text" >
< / div >
< / div >
2021-10-09 18:32:45 +00:00
< div class = "mb-3" >
2021-10-09 19:48:28 +00:00
< label for = "subject-email" class = "form-label" > { { $t ( "Email Subject" ) } } < / label >
< input id = "subject-email" v-model = "$parent.notification.customsubject" type="text" class="form-control" autocomplete="false" placeholder="Service {NAME} on {HOSTNAME} has changed status to {STATUS}" >
2021-10-09 18:32:45 +00:00
< / div >
2021-09-08 17:13:09 +00:00
< div class = "mb-3" >
2021-09-21 05:02:41 +00:00
< label for = "to-email" class = "form-label" > { { $t ( "To Email" ) } } < / label >
2021-10-05 07:57:13 +00:00
< input id = "to-email" v-model = "$parent.notification.smtpTo" type="text" class="form-control" autocomplete="false" placeholder="example2@kuma.pet, example3@kuma.pet" :required="!hasRecipient" >
2021-09-08 17:13:09 +00:00
< / div >
< div class = "mb-3" >
2021-09-21 05:02:41 +00:00
< label for = "to-cc" class = "form-label" > { { $t ( "smtpCC" ) } } < / label >
2021-10-05 07:57:13 +00:00
< input id = "to-cc" v-model = "$parent.notification.smtpCC" type="text" class="form-control" autocomplete="false" :required="!hasRecipient" >
2021-09-08 17:13:09 +00:00
< / div >
< div class = "mb-3" >
2021-09-21 05:02:41 +00:00
< label for = "to-bcc" class = "form-label" > { { $t ( "smtpBCC" ) } } < / label >
2021-10-05 07:57:13 +00:00
< input id = "to-bcc" v-model = "$parent.notification.smtpBCC" type="text" class="form-control" autocomplete="false" :required="!hasRecipient" >
2021-09-08 17:13:09 +00:00
< / div >
< / template >
< script >
import HiddenInput from "../HiddenInput.vue" ;
export default {
components : {
HiddenInput ,
} ,
2021-10-05 07:57:13 +00:00
computed : {
hasRecipient ( ) {
if ( this . $parent . notification . smtpTo || this . $parent . notification . smtpCC || this . $parent . notification . smtpBCC ) {
return true ;
} else {
return false ;
}
}
} ,
2021-09-19 10:05:22 +00:00
mounted ( ) {
if ( typeof this . $parent . notification . smtpSecure === "undefined" ) {
this . $parent . notification . smtpSecure = false ;
}
2021-10-05 07:57:13 +00:00
}
} ;
2021-09-08 17:13:09 +00:00
< / script >