Subclassing MimeMessage to override Message-ID
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Matthew_Schultz
Posted On:   Thursday, February 28, 2002 06:19 PM

I need to override the default Message-ID header, so I'm following the
example from Sun's JavaMail FAQ which recommends:

			
class MyMessage extends MimeMessage {
protected void updateHeaders() throws MessagingException {
super.updateHeaders();
setHeader("Message-ID", "my-message-id");
}
}


However, my compiler complains that "constructor MimeMessage() not found in
class javax.mail.internet.MimeMessage".

What am I missing?

Re: Subclassing MimeMessage to override Message-ID

Posted By:   John_Zukowski  
Posted On:   Thursday, February 28, 2002 09:12 PM

As the compiler error messages says, there is no constructor that accepts no arguments. You must call super() and pass in an appropriate argument.
About | Sitemap | Contact