james-server-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincenzo Gianferrari Pini <vincenzo.gianferrarip...@praxis.it>
Subject Re: Bounce Mailet issue
Date Sat, 12 Feb 2005 13:28:30 GMT
Look at the AbstractRedirect/AbstractNotify/Bounce class hierarchy: just 
extend Bounce overriding the getMessage() method with one that 
dynamically returns the text that will replace the <message> tag contents.

To change the "inline" behaviour, you can either specify an <inline> tag 
with one of the following values:
     unaltered: original message is the new message body
     body: original message body is appended to the new message
     heads: original message headers are appended to the new message
     all: original is appended with all headers
     none: original is not appended (default for AbstractNotify and Bounce)

or override the getInLineType() method returning one of the following 
int constants: UNALTERED, BODY, HEADS, ALL, NONE.

To change the "attachment" behaviour, you can either specify an 
<attachment> tag with one of the following values:
     body: original message body is attached as plain text to the new 
message
     heads: original message headers are attached as plain text to the 
new message
     all: original is attached as plain text with all headers
     message: original message is attached as type message/rfc822, a 
complete mail message (default for AbstractNotify and Bounce)
     none: original is not attached

or override the getAttachmentType() method returning one of the 
following int constants: BODY, HEADS, ALL, MESSAGE, NONE.

 From my understanding, you want <inline>body</inline> and 
<attachment>none</attachment>.

Vincenzo



ramakrishnan kalicut wrote:

>I'm trying to extend Bounce mailet to send a
>dynamically created message, instead of the one
>specified in <message> tag. I donot see any method
>in Bounce class which allows me to do that. I'm able
>to
>get it working using the following statement.
> getMailetContext().bounce(mail, "Invalid email
> address", new
>org.apache.mailet.MailAddress("postmaster@localhost"));
>  
>But the problem is, this sends the bounce back with
>original mail as attachment. I want the original
>mail to be inline. 
>
>Any ideas.
>
>Thanks,
>Ram
>
>
>		
>__________________________________ 
>Do you Yahoo!? 
>Meet the all-new My Yahoo! - Try it today! 
>http://my.yahoo.com 
> 
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>For additional commands, e-mail: server-user-help@james.apache.org
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Mime
View raw message