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 BobU <ru...@gmail.com> on 2011/05/20 01:12:18 UTC

Question about SetMimeHeader() and interfacing with another server via HTTP

I need to add several proprietary headers to all mail messages meeting a
certain criteria, so the natural mailet to use is SetMimeHeader. However,
the header values will vary; they come from a Web application on another
server that the James server will communicate with via HTTP.

So, I have two questions:

1. Is it possible to write a mailet that will communicate via HTTP to this
second server?
2. Assuming 1 can be done, how do you specify the returned value (a string)
as the value of the header field?

Thanks for any help on this.
-- 
View this message in context: http://old.nabble.com/Question-about-SetMimeHeader%28%29-and-interfacing-with-another-server-via-HTTP-tp31660223p31660223.html
Sent from the James - Users mailing list archive at Nabble.com.


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


Re: Question about SetMimeHeader() and interfacing with another server via HTTP

Posted by BobU <ru...@gmail.com>.

Norman Maurer-4 wrote:
> 
> Hi there,
> 
> Yes it is possible. Setting the Header is also Straight forward, just
> have a Look at the SetMimeHeader Class.
> 
> Bye,
> Norman
> 
> 
> Am Freitag, 20. Mai 2011 schrieb BobU <ru...@gmail.com>:
>>
>> I need to add several proprietary headers to all mail messages meeting a
>> certain criteria, so the natural mailet to use is SetMimeHeader. However,
>> the header values will vary; they come from a Web application on another
>> server that the James server will communicate with via HTTP.
>>
>> So, I have two questions:
>>
>> 1. Is it possible to write a mailet that will communicate via HTTP to
>> this
>> second server?
>> 2. Assuming 1 can be done, how do you specify the returned value (a
>> string)
>> as the value of the header field?
>>
>> Thanks for any help on this.
>> --
>> View this message in context:
>> http://old.nabble.com/Question-about-SetMimeHeader%28%29-and-interfacing-with-another-server-via-HTTP-tp31660223p31660223.html
>> Sent from the James - Users mailing list archive at Nabble.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
> 
> 
> 
Thanks, Norman. After I posted my questions, I think I saw how to do it. I'm
fairly adept at servlet programming and if mailets really are modeled on
servlets, then it should be pretty easy. 
-- 
View this message in context: http://old.nabble.com/Question-about-SetMimeHeader%28%29-and-interfacing-with-another-server-via-HTTP-tp31660223p31664295.html
Sent from the James - Users mailing list archive at Nabble.com.


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


Re: Question about SetMimeHeader() and interfacing with another server via HTTP

Posted by Norman Maurer <no...@googlemail.com>.
Hi there,

Yes it is possible. Setting the Header is also Straight forward, just
have a Look at the SetMimeHeader Class.

Bye,
Norman


Am Freitag, 20. Mai 2011 schrieb BobU <ru...@gmail.com>:
>
> I need to add several proprietary headers to all mail messages meeting a
> certain criteria, so the natural mailet to use is SetMimeHeader. However,
> the header values will vary; they come from a Web application on another
> server that the James server will communicate with via HTTP.
>
> So, I have two questions:
>
> 1. Is it possible to write a mailet that will communicate via HTTP to this
> second server?
> 2. Assuming 1 can be done, how do you specify the returned value (a string)
> as the value of the header field?
>
> Thanks for any help on this.
> --
> View this message in context: http://old.nabble.com/Question-about-SetMimeHeader%28%29-and-interfacing-with-another-server-via-HTTP-tp31660223p31660223.html
> Sent from the James - Users mailing list archive at Nabble.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