MCPcopy Create free account
hub / github.com/M66B/FairEmail / getFrom

Method getFrom

app/src/main/java/com/sun/mail/imap/IMAPMessage.java:295–313  ·  view source on GitHub ↗

Get the "From" attribute.

()

Source from the content-addressed store, hash-verified

293 * Get the "From" attribute.
294 */
295 @Override
296 public Address[] getFrom() throws MessagingException {
297 checkExpunged();
298 if (bodyLoaded)
299 return super.getFrom();
300 loadEnvelope();
301 InternetAddress[] a = envelope.from;
302 /*
303 * Per RFC 2822, the From header is required, and thus the IMAP
304 * spec also requires that it be present, but we know that in
305 * practice it is often missing. Some servers fill in the
306 * From field with the Sender field in this case, but at least
307 * Exchange 2007 does not. Use the same fallback strategy used
308 * by MimeMessage.
309 */
310 if (a == null || a.length == 0)
311 a = envelope.sender;
312 return aaclone(a);
313 }
314
315 @Override
316 public void setFrom(Address address) throws MessagingException {

Callers 2

getReplyToMethod · 0.95
mailFromMethod · 0.45

Calls 3

checkExpungedMethod · 0.95
loadEnvelopeMethod · 0.95
aacloneMethod · 0.95

Tested by

no test coverage detected