Revision 3f689908
SL/BackgroundJob/ImportRecordEmails.pm | ||
---|---|---|
32 | 32 |
folder => $config->{folder}, |
33 | 33 |
email_journal_params => { |
34 | 34 |
record_type => $config->{record_type}, |
35 |
} |
|
35 |
}, |
|
36 |
skip_broken_mime_mails => $config->{skip_broken_mime_mails}, |
|
36 | 37 |
); |
37 | 38 |
return "No emails to import." unless $email_import; |
38 | 39 |
if ($config->{imported_imap_flag}) { |
... | ... | |
166 | 167 |
not_processed_imap_flag => { type => SCALAR, optional => 1, }, |
167 | 168 |
email_import_ids_to_delete => { type => ARRAYREF, optional => 1, }, |
168 | 169 |
imported_imap_flag => { type => SCALAR, optional => 1, }, |
170 |
skip_broken_mime_mails => { type => SCALAR, optional => 1, }, |
|
169 | 171 |
# email config |
170 | 172 |
hostname => { type => SCALAR, }, |
171 | 173 |
port => { type => SCALAR, optional => 1}, |
SL/IMAPClient.pm | ||
---|---|---|
125 | 125 |
type => HASHREF | UNDEF, |
126 | 126 |
optional => 1, |
127 | 127 |
}, |
128 |
skip_broken_mime_mails => { |
|
129 |
type => SCALAR | UNDEF, |
|
130 |
optional => 1, |
|
131 |
}, |
|
128 | 132 |
}); |
129 | 133 |
my $folder_path = $params{folder} || $self->{base_folder}; |
130 | 134 |
|
... | ... | |
134 | 138 |
base_folder_path => $folder_path, |
135 | 139 |
folder_strings => [$folder_string], |
136 | 140 |
email_journal_params => $params{email_journal_params}, |
141 |
skip_broken_mime_mails => $params{skip_broken_mime_mails}, |
|
137 | 142 |
); |
138 | 143 |
|
139 | 144 |
return $email_import; |
... | ... | |
150 | 155 |
type => HASHREF | UNDEF, |
151 | 156 |
optional => 1, |
152 | 157 |
}, |
158 |
skip_broken_mime_mails => { |
|
159 |
type => SCALAR | UNDEF, |
|
160 |
optional => 1, |
|
161 |
}, |
|
153 | 162 |
}); |
154 | 163 |
my $base_folder_path = $params{base_folder} || $self->{base_folder}; |
155 | 164 |
|
... | ... | |
163 | 172 |
base_folder_path => $base_folder_path, |
164 | 173 |
folder_strings => \@subfolder_strings, |
165 | 174 |
email_journal_params => $params{email_journal_params}, |
175 |
skip_broken_mime_mails => $params{skip_broken_mime_mails}, |
|
166 | 176 |
); |
167 | 177 |
|
168 | 178 |
return $email_import; |
... | ... | |
177 | 187 |
type => HASHREF | UNDEF, |
178 | 188 |
optional => 1, |
179 | 189 |
}, |
190 |
skip_broken_mime_mails => { |
|
191 |
type => SCALAR | UNDEF, |
|
192 |
optional => 1, |
|
193 |
}, |
|
180 | 194 |
}); |
181 |
|
|
182 | 195 |
my $dbh = SL::DB->client->dbh; |
183 | 196 |
|
184 | 197 |
my $email_import; |
... | ... | |
758 | 771 |
|
759 | 772 |
Updates the emails for a folder. Checks which emails are missing and |
760 | 773 |
fetches these from the IMAP server. Returns the created email import object. |
774 |
Accepts some optional params, for instance <Cskip_broken_mime_mails> which |
|
775 |
silently surpresses error message if a email is not MIME compatible. |
|
776 |
This is useful if loads of emails needs to be imported and the importer |
|
777 |
doesn´t really care about some not parseable mails. |
|
761 | 778 |
|
762 | 779 |
=item C<update_emails_from_subfolders> |
763 | 780 |
|
Auch abrufbar als: Unified diff
Neue Option skip nicht parsebare mails bei Import von E-mails