Finished signature support for outgoing mail

master
Kevin Froman 2020-03-04 04:45:27 -06:00
parent 4516cdee24
commit 61d60c13d2
2 changed files with 7 additions and 0 deletions

View File

@ -17,4 +17,7 @@ fetch('/config/get/mail', {
if (mailSettings.notificationSetting === false){ if (mailSettings.notificationSetting === false){
document.getElementById('notificationSetting').checked = false document.getElementById('notificationSetting').checked = false
} }
if (mailSettings.signature !== false){
document.getElementById('mailSignatureSetting').value = mailSettings.signature
}
}) })

View File

@ -46,6 +46,10 @@ function sendMail(toData, message, subject){
message = padString(message) message = padString(message)
} }
if (document.getElementById('mailSignatureSetting').value !== false){
message += "\n"
message += document.getElementById('mailSignatureSetting').value
}
postData = {'message': message, 'to': toData, 'type': 'pm', 'encrypt': true, 'meta': JSON.stringify(meta)} postData = {'message': message, 'to': toData, 'type': 'pm', 'encrypt': true, 'meta': JSON.stringify(meta)}
postData.forward = document.getElementById('forwardSecrecySetting').checked postData.forward = document.getElementById('forwardSecrecySetting').checked