Get the "From" attribute.
()
| 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 { |
no test coverage detected