mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-25 18:35:06 +01:00
Fixed saving without from address
This commit is contained in:
@@ -85,8 +85,11 @@ public class MessageHelper {
|
||||
static MimeMessage from(EntityMessage message, Session isession) throws MessagingException {
|
||||
MimeMessage imessage = new MimeMessage(isession);
|
||||
|
||||
if (message.from != null)
|
||||
imessage.setFrom(MessageHelper.decodeAddresses(message.from)[0]);
|
||||
if (message.from != null) {
|
||||
Address[] from = MessageHelper.decodeAddresses(message.from);
|
||||
if (from.length > 0)
|
||||
imessage.setFrom(from[0]);
|
||||
}
|
||||
|
||||
if (message.to != null)
|
||||
imessage.setRecipients(Message.RecipientType.TO, MessageHelper.decodeAddresses(message.to));
|
||||
|
||||
Reference in New Issue
Block a user