Prepare envelope from

This commit is contained in:
M66B 2024-04-24 14:20:03 +02:00
parent 4569ff5b2b
commit bddae1af77
3 changed files with 9 additions and 0 deletions

View File

@ -332,6 +332,10 @@ public class EmailService implements AutoCloseable {
properties.put("mail." + protocol + ".ignorebodystructuresize", Boolean.toString(enabled));
}
void setMailFrom(String address) {
properties.put("mail." + protocol + ".from", address);
}
void setSendPartial(boolean enabled) {
properties.put("mail." + protocol + ".sendpartial", Boolean.toString(enabled));
}

View File

@ -27,6 +27,7 @@ import androidx.annotation.NonNull;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.ForeignKey;
import androidx.room.Ignore;
import androidx.room.Index;
import androidx.room.PrimaryKey;
@ -62,6 +63,8 @@ public class EntityIdentity {
public String name;
@NonNull
public String email;
@Ignore
public String envelopeFrom;
@NonNull
public Long account;
public String display;

View File

@ -793,6 +793,8 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
} else {
EmailService iservice = new EmailService(this, ident, EmailService.PURPOSE_USE, debug);
try {
if (ident.envelopeFrom != null)
iservice.setMailFrom(ident.envelopeFrom);
if (send_partial)
iservice.setSendPartial(true);
iservice.setUseIp(ident.use_ip, ident.ehlo);