문제

I'm trying to get the FROM email address in Mule ESB.
I'm getting the retrieved object as MimeBodyPart, I'd like to have MimeMessage instead. How to do this?

Any solution - either in Mule or Java is welcome.

The Mule config part for inbound end-point is as below -

<inbound>
    <pop3s:inbound-endpoint user="xxx%40gmail.com" password="xxx" host="pop.gmail.com"/>
</inbound>

Thanks in advance.

도움이 되었습니까?

해결책

The solution is this -

MimeBodyPart obj;
MimeMultipart top = (MimeMultipart) obj.getParent();
MimeMessage msg = (MimeMessage) top.getParent();

The initial obj is provided by Mule.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top