mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-23 14:41:08 +00:00
Anonymous Reporting-MTA
This commit is contained in:
parent
566386f243
commit
e4f4eccfce
1 changed files with 8 additions and 1 deletions
|
@ -835,12 +835,19 @@ public class MessageHelper {
|
|||
plainPart.setContent(plainContent, "text/plain; charset=" + Charset.defaultCharset().name());
|
||||
report.addBodyPart(plainPart);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean client_id = prefs.getBoolean("client_id", true);
|
||||
|
||||
String from = null;
|
||||
if (message.from != null && message.from.length > 0)
|
||||
from = ((InternetAddress) message.from[0]).getAddress();
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Reporting-MTA: dns;").append(EmailService.getDefaultEhlo()).append("\r\n");
|
||||
sb.append("Reporting-MTA: dns;");
|
||||
if (client_id)
|
||||
sb.append(EmailService.getDefaultEhlo()).append("\r\n");
|
||||
else
|
||||
sb.append("example.com").append("\r\n");
|
||||
sb.append("\r\n");
|
||||
|
||||
if (from != null)
|
||||
|
|
Loading…
Reference in a new issue