I have a class say TestEmail
which has a sendEmail()
method
Now the sendEmail
method calls an apache commons method which internally call methods from the javax.mail
package. I want to override one of the internal methods. I am providing the code flow below:
TestEmail.sendEmail()->
commons.Email.send()->commons.Email.sendMIMEMessage()->
javax.mail.Transport.send()->javax.mail.Transport(){saveChanges()}->
javax.mail.MimeMessage.updateHeaders()->updateMessageID()
I want to override the updateMessageID
method. within my TestEmail
class. Is it possible? How?