mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Improved Sieve code and added rfc5435
This commit is contained in:
parent
f453abf149
commit
b3c1723c5c
10 changed files with 165 additions and 65 deletions
|
|
@ -70,30 +70,15 @@ export class VacationCommand extends GrammarCommand
|
|||
|
||||
pushArguments(args)
|
||||
{
|
||||
this._reason.value = args.pop().value; // GrammarQuotedString
|
||||
args.forEach((arg, i) => {
|
||||
if (':mime' === arg) {
|
||||
this.mime = true;
|
||||
} else if (i === args.length-1) {
|
||||
this._reason.value = arg.value; // GrammarQuotedString
|
||||
} else switch (args[i-1]) {
|
||||
case ':days':
|
||||
this._days.value = arg.value; // GrammarNumber
|
||||
break;
|
||||
// case ':seconds':
|
||||
// this._seconds.value = arg.value; // GrammarNumber
|
||||
// break;
|
||||
case ':subject':
|
||||
this._subject.value = arg.value; // GrammarQuotedString
|
||||
break;
|
||||
case ':from':
|
||||
this._from.value = arg.value; // GrammarQuotedString
|
||||
break;
|
||||
case ':addresses':
|
||||
this.addresses = arg; // GrammarStringList
|
||||
break;
|
||||
case ':handle':
|
||||
this._from.value = arg.value; // GrammarQuotedString
|
||||
break;
|
||||
} else if (':addresses' === args[i-1]) {
|
||||
this.addresses = arg; // GrammarStringList
|
||||
} else if (':' === args[i-1][0]) {
|
||||
// :days, :seconds, :subject, :from, :handle
|
||||
this[args[i-1].replace(':','_')].value = arg.value;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue