[prev in list] [next in list] [prev in thread] [next in thread]
List: james-user
Subject: Re: Sample Mailet to send acknowledgement message
From: Rex Posadas <rex () kalexo ! com>
Date: 2008-03-26 17:38:20
Message-ID: 47EA8A0C.7090306 () kalexo ! com
[Download RAW message or body]
Hi,
Thanks for the response.
I put something like this in the config file:
<mailet match="All" class="Redirect">
<to>green@localhost</to>
<sender>postmaster@localhost</sender>
<message>This is to acknowledge that we received your
email</message>
<inline>unaltered</inline>
<passThrough>FALSE</passThrough>
<replyTo>postmaster</replyTo>
<prefix xml:space="preserve">[test mailing] </prefix>
<static>TRUE</static>
</mailet>
I put this inside the <processor> tags. But I'm getting error:
exception! javax.mail.MessagingException: Unable to create a new message
name: too long. Possible loop in config.xml.
I can see how this could be.. I am running this locally, so i have a
user called harry@localhost ... when I send him an acknowledgment
letter, it will go back to this mailet again.
How do I prevent this loop?
My next problem would be "right now the To: field is hard coded. how do
i set that to the from address?"
Thanks,
r
Danny Angus wrote:
> Sorry for the slow response,
>
> look at the "service()" method of
> http://svn.apache.org/viewvc/james/server/tags/build_2_3_1/src/java/org/apache/james/transport/mailet/AbstractRedirect.java?view=markup
>
> d.
>
> On Fri, Mar 14, 2008 at 8:53 AM, Rex Posadas <rex@kalexo.com> wrote:
>
> > Hi All,
> >
> > I want to do the following:
> >
> > 1 - James receives an Email.
> > 2 - James has a Mailet that Processes that Email
> > 3 - James sends an acknowledgement email message saying that it has
> > processed the email.
> >
> > The acknowledgment email is a customized email So I was thinking of
> > creating a Mailet for it. "Customized" meaning that the message may
> > contain values retrieved from a Database.
> >
> > My Question is: Can someone point me to some code that would help me get
> > started? I am thinking of Mailet code that sends even a simple "Got the
> > Message, thanks".
> >
> > Or Can someone give a quick note on how I can get started? I already
> > wrote a Mailet that put data in a database. I just need one that sends
> > out an email.
> >
> > I looked in my James installation and I don't see any sample Mailets. I
> > can't find any in the Apache James site. I'm probably looking in the
> > wrong places.
> >
> > Thanks,
> > - Rex
> >
> > ---------------------------------------------------------------------
> > 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
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic