Added SMTP DSN

pull/184/head
M66B 4 years ago
parent b1794c6086
commit 532930b710

@ -263,6 +263,11 @@ public class EmailService implements AutoCloseable {
properties.put("mail.mime.allowutf8", Boolean.toString(value));
}
// https://tools.ietf.org/html/rfc3461
void setDsnNotify(String what) {
properties.put("mail." + protocol + ".dsn.notify", what);
}
void setListener(StoreListener listener) {
this.listener = listener;
}

@ -584,6 +584,12 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
iservice.setUseIp(ident.use_ip, ident.ehlo);
iservice.setUnicode(ident.unicode);
if (message.receipt_request != null && message.receipt_request) {
int receipt_type = prefs.getInt("receipt_type", 2);
if (receipt_type == 1 || receipt_type == 2) // Delivery receipt
iservice.setDsnNotify("SUCCESS,FAILURE,DELAY");
}
// Connect transport
db.identity().setIdentityState(ident.id, "connecting");
iservice.connect(ident);

Loading…
Cancel
Save