(feat) can now discard incoming mails during vacation
This commit is contained in:
parent
e8e0df8b53
commit
6e04a2d99c
1
NEWS
1
NEWS
|
@ -12,6 +12,7 @@ Enhancements
|
||||||
- [web] added custom fields support from Thunderbird's address book
|
- [web] added custom fields support from Thunderbird's address book
|
||||||
- [web] added Latvian (lv) translation - thanks to Juris Balandis
|
- [web] added Latvian (lv) translation - thanks to Juris Balandis
|
||||||
- [web] expose user's defaults and settings inline
|
- [web] expose user's defaults and settings inline
|
||||||
|
- [web] can now discard incoming mails during vacation
|
||||||
|
|
||||||
Bug fixes
|
Bug fixes
|
||||||
- [web] respect SOGoLanguage and SOGoSupportedLanguages (#4169)
|
- [web] respect SOGoLanguage and SOGoSupportedLanguages (#4169)
|
||||||
|
|
|
@ -831,8 +831,10 @@ static NSString *sieveScriptName = @"sogo";
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
// We handle vacation messages.
|
// We handle vacation messages.
|
||||||
// See http://ietfreport.isoc.org/idref/draft-ietf-sieve-vacation/
|
// See http://ietfreport.isoc.org/idref/draft-ietf-sieve-vacation/
|
||||||
|
//
|
||||||
values = [ud vacationOptions];
|
values = [ud vacationOptions];
|
||||||
now = [[NSCalendarDate calendarDate] timeIntervalSince1970];
|
now = [[NSCalendarDate calendarDate] timeIntervalSince1970];
|
||||||
|
|
||||||
|
@ -849,13 +851,14 @@ static NSString *sieveScriptName = @"sogo";
|
||||||
NSString *text, *templateFilePath, *customSubject;
|
NSString *text, *templateFilePath, *customSubject;
|
||||||
SOGoTextTemplateFile *templateFile;
|
SOGoTextTemplateFile *templateFile;
|
||||||
|
|
||||||
BOOL ignore, alwaysSend, useCustomSubject;
|
BOOL ignore, alwaysSend, useCustomSubject, discardMails;
|
||||||
int days, i;
|
int days, i;
|
||||||
|
|
||||||
allConditions = [NSMutableArray array];
|
allConditions = [NSMutableArray array];
|
||||||
days = [[values objectForKey: @"daysBetweenResponse"] intValue];
|
days = [[values objectForKey: @"daysBetweenResponse"] intValue];
|
||||||
addresses = [values objectForKey: @"autoReplyEmailAddresses"];
|
addresses = [values objectForKey: @"autoReplyEmailAddresses"];
|
||||||
alwaysSend = [[values objectForKey: @"alwaysSend"] boolValue];
|
alwaysSend = [[values objectForKey: @"alwaysSend"] boolValue];
|
||||||
|
discardMails = [[values objectForKey: @"discardMails"] boolValue];
|
||||||
ignore = [[values objectForKey: @"ignoreLists"] boolValue];
|
ignore = [[values objectForKey: @"ignoreLists"] boolValue];
|
||||||
useCustomSubject = [[values objectForKey: @"customSubjectEnabled"] boolValue];
|
useCustomSubject = [[values objectForKey: @"customSubjectEnabled"] boolValue];
|
||||||
customSubject = [values objectForKey: @"customSubject"];
|
customSubject = [values objectForKey: @"customSubject"];
|
||||||
|
@ -962,6 +965,10 @@ static NSString *sieveScriptName = @"sogo";
|
||||||
if ([allConditions count])
|
if ([allConditions count])
|
||||||
[vacation_script appendString: @"}\r\n"];
|
[vacation_script appendString: @"}\r\n"];
|
||||||
|
|
||||||
|
// Should we discard incoming mails during vacation?
|
||||||
|
if (discardMails)
|
||||||
|
[vacation_script appendString: @"discard;\r\n"];
|
||||||
|
|
||||||
//
|
//
|
||||||
// See https://sogo.nu/bugs/view.php?id=2332 for details
|
// See https://sogo.nu/bugs/view.php?id=2332 for details
|
||||||
//
|
//
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
"Enable auto reply on" = "Enable auto reply on";
|
"Enable auto reply on" = "Enable auto reply on";
|
||||||
"Disable auto reply on" = "Disable auto reply on";
|
"Disable auto reply on" = "Disable auto reply on";
|
||||||
"Always send vacation message response" = "Always send vacation message response";
|
"Always send vacation message response" = "Always send vacation message response";
|
||||||
|
"Discard incoming mails during vacation" = "Discard incoming mails during vacation";
|
||||||
"Please specify your message and your email addresses for which you want to enable auto reply."
|
"Please specify your message and your email addresses for which you want to enable auto reply."
|
||||||
= "Please specify your message and your email addresses for which you want to enable auto reply.";
|
= "Please specify your message and your email addresses for which you want to enable auto reply.";
|
||||||
"Your vacation message must not end with a single dot on a line." = "Your vacation message must not end with a single dot on a line.";
|
"Your vacation message must not end with a single dot on a line." = "Your vacation message must not end with a single dot on a line.";
|
||||||
|
|
|
@ -951,6 +951,15 @@
|
||||||
</md-checkbox>
|
</md-checkbox>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<md-checkbox
|
||||||
|
ng-model="app.preferences.defaults.Vacation.discardMails"
|
||||||
|
ng-true-value="1"
|
||||||
|
ng-false-value="0">
|
||||||
|
<var:string label:value="Discard incoming mails during vacation"/>
|
||||||
|
</md-checkbox>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</md-tab>
|
</md-tab>
|
||||||
|
|
Loading…
Reference in a new issue