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 Etewa <jc...@gmail.com> on 2006/10/11 18:39:26 UTC

Mailet Init Params

I am writing a custom mailet and can't figure out why my init params aren't
showing up.  I am compiling source and my config files and jars are showing
up in james.sar.  I have searched this list and Google with no luck.  The
mailet is being called and processing like I would expect.

Here is the snippet from my config file:

<mailet match="All" class="EmailBounce">
    <queue>Some Name</queue>
    <jmsProviderUrl>Some Name</jmsProviderUrl>
</mailet>

My init() from the Mailet
	
public void init() throws MessagingException {
        super.init();
        log("Initializing SMTEmailBounce Mailet: ");
	queueName = getInitParameter("queue");
	jmsProviderUrl = getInitParameter("jmsProviderUrl");
	log("Mailet Params: " + jmsProviderUrl + "|" + queueName);
	
	log("Getting all init params");
	Iterator iter = getInitParameterNames();
	while(iter.hasNext()) {
		log("Param Names: " + iter.next());
	}
}

Any help is apprecited,

Thanks,

James
-- 
View this message in context: http://www.nabble.com/Mailet-Init-Params-tf2424653.html#a6760072
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: Mailet Init Params

Posted by Etewa <jc...@gmail.com>.
I am using Version 2.2.0

Yes, I am extending GenericMailet .

Yes, here is the log output
11/10/06 10:37:21 INFO  James.Mailet: SMTEmailBounce: Initializing
SMTEmailBounce Mailet: 
11/10/06 10:37:21 INFO  James.Mailet: SMTEmailBounce: Mailet Params:
null|null
11/10/06 10:37:21 INFO  James.Mailet: SMTEmailBounce: getting init params

http://www.nabble.com/file/3604/SMTEmailBounce.java SMTEmailBounce.java 


Stefano Bagnara-2 wrote:
> 
> What version of james are you using?
> Are you extending GenericMailet ? init() is only available in 
> GenericMailet extensions and not in the Mailet interface..
> 
> Do you see the logs you added?
> 
> Stefano
> 
> Etewa wrote:
>> I am writing a custom mailet and can't figure out why my init params
>> aren't
>> showing up.  I am compiling source and my config files and jars are
>> showing
>> up in james.sar.  I have searched this list and Google with no luck.  The
>> mailet is being called and processing like I would expect.
>> 
>> Here is the snippet from my config file:
>> 
>> <mailet match="All" class="EmailBounce">
>>     <queue>Some Name</queue>
>>     <jmsProviderUrl>Some Name</jmsProviderUrl>
>> </mailet>
>> 
>> My init() from the Mailet
>> 	
>> public void init() throws MessagingException {
>>         super.init();
>>         log("Initializing SMTEmailBounce Mailet: ");
>> 	queueName = getInitParameter("queue");
>> 	jmsProviderUrl = getInitParameter("jmsProviderUrl");
>> 	log("Mailet Params: " + jmsProviderUrl + "|" + queueName);
>> 	
>> 	log("Getting all init params");
>> 	Iterator iter = getInitParameterNames();
>> 	while(iter.hasNext()) {
>> 		log("Param Names: " + iter.next());
>> 	}
>> }
>> 
>> Any help is apprecited,
>> 
>> Thanks,
>> 
>> James
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Mailet-Init-Params-tf2424653.html#a6760729
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: Mailet Init Params

Posted by Norman Maurer <nm...@byteaction.de>.
Are you sure you really have this in config:

    <queue>Some Name</queue>
    <jmsProviderUrl>Some Name</jmsProviderUrl> 


bye
Norman

Etewa schrieb:
> I am using Version 2.2.0
>
> Yes, I am extending GenericMailet .
>
> Yes, here is the log output
> 11/10/06 10:37:21 INFO  James.Mailet: SMTEmailBounce: Initializing
> SMTEmailBounce Mailet: 
> 11/10/06 10:37:21 INFO  James.Mailet: SMTEmailBounce: Mailet Params:
> null|null
> 11/10/06 10:37:21 INFO  James.Mailet: SMTEmailBounce: getting init params
>
> http://www.nabble.com/file/3604/SMTEmailBounce.java SMTEmailBounce.java 
>
>
> Stefano Bagnara-2 wrote:
>   
>> What version of james are you using?
>> Are you extending GenericMailet ? init() is only available in 
>> GenericMailet extensions and not in the Mailet interface..
>>
>> Do you see the logs you added?
>>
>> Stefano
>>
>> Etewa wrote:
>>     
>>> I am writing a custom mailet and can't figure out why my init params
>>> aren't
>>> showing up.  I am compiling source and my config files and jars are
>>> showing
>>> up in james.sar.  I have searched this list and Google with no luck.  The
>>> mailet is being called and processing like I would expect.
>>>
>>> Here is the snippet from my config file:
>>>
>>> <mailet match="All" class="EmailBounce">
>>>     <queue>Some Name</queue>
>>>     <jmsProviderUrl>Some Name</jmsProviderUrl>
>>> </mailet>
>>>
>>> My init() from the Mailet
>>> 	
>>> public void init() throws MessagingException {
>>>         super.init();
>>>         log("Initializing SMTEmailBounce Mailet: ");
>>> 	queueName = getInitParameter("queue");
>>> 	jmsProviderUrl = getInitParameter("jmsProviderUrl");
>>> 	log("Mailet Params: " + jmsProviderUrl + "|" + queueName);
>>> 	
>>> 	log("Getting all init params");
>>> 	Iterator iter = getInitParameterNames();
>>> 	while(iter.hasNext()) {
>>> 		log("Param Names: " + iter.next());
>>> 	}
>>> }
>>>
>>> Any help is apprecited,
>>>
>>> Thanks,
>>>
>>> James
>>>       
>>
>> ---------------------------------------------------------------------
>> 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


Re: Mailet Init Params

Posted by Stefano Bagnara <ap...@bago.org>.
What version of james are you using?
Are you extending GenericMailet ? init() is only available in 
GenericMailet extensions and not in the Mailet interface..

Do you see the logs you added?

Stefano

Etewa wrote:
> I am writing a custom mailet and can't figure out why my init params aren't
> showing up.  I am compiling source and my config files and jars are showing
> up in james.sar.  I have searched this list and Google with no luck.  The
> mailet is being called and processing like I would expect.
> 
> Here is the snippet from my config file:
> 
> <mailet match="All" class="EmailBounce">
>     <queue>Some Name</queue>
>     <jmsProviderUrl>Some Name</jmsProviderUrl>
> </mailet>
> 
> My init() from the Mailet
> 	
> public void init() throws MessagingException {
>         super.init();
>         log("Initializing SMTEmailBounce Mailet: ");
> 	queueName = getInitParameter("queue");
> 	jmsProviderUrl = getInitParameter("jmsProviderUrl");
> 	log("Mailet Params: " + jmsProviderUrl + "|" + queueName);
> 	
> 	log("Getting all init params");
> 	Iterator iter = getInitParameterNames();
> 	while(iter.hasNext()) {
> 		log("Param Names: " + iter.next());
> 	}
> }
> 
> Any help is apprecited,
> 
> Thanks,
> 
> James



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