You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by ramakrishnan kalicut <ka...@yahoo.com> on 2005/02/11 21:06:13 UTC
Bounce Mailet issue
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
Re: Bounce Mailet issue
Posted by ramakrishnan kalicut <ka...@yahoo.com>.
Thanks Vincenzo. Its exactly what i needed. I was
overriding getMessage(Mail) which allows to change the
content of original mail and not the bounce back.
Thank You.
--Ram
--- Vincenzo Gianferrari Pini
<vi...@praxis.it> wrote:
> 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
>
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Bounce Mailet issue
Posted by Vincenzo Gianferrari Pini <vi...@praxis.it>.
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