Mail from first header

pull/215/head
M66B 7 months ago
parent 420d78efeb
commit bce1420a4e

@ -2204,18 +2204,17 @@ public class MessageHelper {
}
Address[] getMailFrom(String[] headers) {
if (headers == null)
if (headers == null || headers.length == 0)
return null;
Address[] mailfrom = null;
for (String header : headers) {
String spf = getKeyValues(header).get("spf");
String spf = getKeyValues(headers[0]).get("spf");
if (spf == null)
continue;
return null;
int i = spf.indexOf(SMTP_MAILFORM + "=");
if (i < 0)
continue;
return null;
String v = spf.substring(i + SMTP_MAILFORM.length() + 1);
int s = v.indexOf(' ');
@ -2230,7 +2229,6 @@ public class MessageHelper {
} catch (Throwable ex) {
Log.w(ex);
}
}
return mailfrom;
}

Loading…
Cancel
Save