mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-03 05:34:51 +00:00
Allow sending invalid iCalendar files
This commit is contained in:
parent
3005bd008f
commit
54e26a1c9d
1 changed files with 15 additions and 12 deletions
|
@ -1382,19 +1382,22 @@ public class MessageHelper {
|
|||
|
||||
for (EntityAttachment attachment : attachments)
|
||||
if (attachment.available &&
|
||||
"text/calendar".equals(attachment.type)) {
|
||||
File file = attachment.getFile(context);
|
||||
ICalendar icalendar = CalendarHelper.parse(context, file);
|
||||
Method method = (icalendar == null ? null : icalendar.getMethod());
|
||||
if (method != null && method.isReply()) {
|
||||
// https://www.rfc-editor.org/rfc/rfc6047#section-2.4
|
||||
BodyPart calPart = new MimeBodyPart();
|
||||
calPart.setContent(icalendar.write(), attachment.type + ";" +
|
||||
" method=" + method.getValue() + ";" +
|
||||
" charset=UTF-8;");
|
||||
altMultiPart.addBodyPart(calPart);
|
||||
"text/calendar".equals(attachment.type))
|
||||
try {
|
||||
File file = attachment.getFile(context);
|
||||
ICalendar icalendar = CalendarHelper.parse(context, file);
|
||||
Method method = (icalendar == null ? null : icalendar.getMethod());
|
||||
if (method != null && method.isReply()) {
|
||||
// https://www.rfc-editor.org/rfc/rfc6047#section-2.4
|
||||
BodyPart calPart = new MimeBodyPart();
|
||||
calPart.setContent(icalendar.write(), attachment.type + ";" +
|
||||
" method=" + method.getValue() + ";" +
|
||||
" charset=UTF-8;");
|
||||
altMultiPart.addBodyPart(calPart);
|
||||
}
|
||||
} catch (Throwable ex) {
|
||||
Log.w(ex);
|
||||
}
|
||||
}
|
||||
|
||||
int availableAttachments = 0;
|
||||
boolean hasInline = false;
|
||||
|
|
Loading…
Reference in a new issue