We process incoming google emails using Aspose Java Email and we are currently facing an issue with one of the email . Please find the attachment. Email display name shows the senders name with out email domain but when I use the option of “Show Original” I can see the senders domain name. What APIs need to be used to get this domain name of the sender. We are using MaimMessage.getFrom().getAddress() which is returning empty string.
Thank you for posting your inquiry.
MailMessage class reads the information of an email from its header.
Headers such as Subject, From, To, etc. from email server are used to
populate these fields in the MailMessage object. If you see in the attached screenshot, you can see that the From Header doesn’t have this value and that is why Aspose.Email doesn’t provide this information.
Sure I agree with that .