Revision 9b8a38b3
Von Tamino Steinert vor etwa 1 Jahr hinzugefügt
SL/IMAPClient.pm | ||
---|---|---|
64 | 64 |
. $self->{imap_client}->LastError() . "\n"; |
65 | 65 |
} |
66 | 66 |
|
67 |
sub set_flag_for_email { |
|
68 |
my ($self, $email_journal, $imap_flag) = @_; |
|
69 |
return unless $imap_flag; |
|
70 |
|
|
71 |
my $folder_string = $email_journal->folder; |
|
72 |
|
|
73 |
$self->{imap_client}->select($folder_string) |
|
74 |
or die "Could not select IMAP folder '$folder_string': $@\n"; |
|
75 |
|
|
76 |
my $folder_uidvalidity = $self->{imap_client}->uidvalidity($folder_string) |
|
77 |
or die "Could not get UIDVALIDITY for folder '$folder_string': $@\n"; |
|
78 |
|
|
79 |
if ($folder_uidvalidity != $email_journal->folder_uidvalidity) { |
|
80 |
die "Folder has changed: $folder_string\n" |
|
81 |
} |
|
82 |
|
|
83 |
my $uid = $email_journal->uid; |
|
84 |
$self->{imap_client}->set_flag($imap_flag, [$uid]) |
|
85 |
or die "Could not add flag '$imap_flag' to message '$uid': " |
|
86 |
. $self->{imap_client}->LastError() . "\n"; |
|
87 |
} |
|
88 |
|
|
67 | 89 |
sub update_emails_from_folder { |
68 | 90 |
my ($self, $folder_path, $params) = @_; |
69 | 91 |
$folder_path ||= $self->{base_folder}; |
Auch abrufbar als: Unified diff
IMAPClient: Funktion zum setzen von Email-Flags