As suggested, I am trying the latest JAMES with this change in
RemoteDelivery.
This did get rid of the infinite loop of exception I experienced with JAMES
1.2.1.
I am using the new RemoteDelivery to start with.
Tried once with Vector and once with ArrayList.
I also printed out the result of
'getMailetContext().getPostmaster().toString()' and it looks good:
-------------------------------------------
//            getMailetContext().bounce(mail, sout.toString());//this is the
original key line in the original RemoteDelivery
   ArrayList recips = new ArrayList();
//   Vector recips = new Vector();
   recips.add(getMailetContext().getPostmaster().toString());

getMailetContext().sendMail(getMailetContext().getPostmaster(),(Collection)r
ecips,mail.getMessage(),"error");

-------------------------------------------
According to javadocs (look at the recipients parameter definition):

sendMail
public void sendMail(MailAddress sender,
                     java.util.Collection recipients,
                     javax.mail.internet.MimeMessage msg,
                     java.lang.String state)
              throws javax.mail.MessagingException
  Send an outgoing message to the top of this mailet container queue for the
appropriate processor that is specified.
    Parameters:
    sender - - the sender of the message
    recipients - - a Collection of String objects of recipients
    msg - - the MimeMessage of the headers and body content of the outgoing
message
    state - - the state of the message, indicates which processor to use
    Throws:
    javax.mail.MessagingException - - if the message fails to parse
-------------------------------------------


But I keep getting arraycopy exceptions either way, Vector or ArrayList.
Iit seems that the recipients parameter is not accepting my collection of
String recipients:


-------------------------------------------

C:\mailserver\bin>run

Phoenix 3.1a1-dev

James 2.0a2
Started POP3 Server plain:110
Started SMTP Server plain:25
Started NNTP Server plain:119
Exception in processor <error>
java.lang.ArrayStoreException
        at java.lang.System.arraycopy(Native Method)
        at java.util.Vector.toArray(Vector.java:679)
        at
org.apache.james.transport.LinearProcessor.verifyMailAddresses(LinearProcess
or.java:215)
        at
org.apache.james.transport.LinearProcessor.service(LinearProcessor.java:139)
        at
org.apache.james.transport.JamesSpoolManager.process(JamesSpoolManager.java:
241)
        at
org.apache.james.transport.JamesSpoolManager.run(JamesSpoolManager.java:208)
        at
org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(Executabl
eRunnable.java:47)
        at
org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread.java:8
0)
JVM exiting abnormally. Shutting down Phoenix.
Terminate batch job (Y/N)? y

C:\mailserver\bin>
C:\mailserver\bin>
C:\mailserver\bin>run

Phoenix 3.1a1-dev

James 2.0a2
Started POP3 Server plain:110
Started SMTP Server plain:25
Started NNTP Server plain:119
Exception in processor <error>
java.lang.ArrayStoreException
        at java.lang.System.arraycopy(Native Method)
        at java.util.ArrayList.toArray(ArrayList.java:288)
        at
org.apache.james.transport.LinearProcessor.verifyMailAddresses(LinearProcess
or.java:215)
        at
org.apache.james.transport.LinearProcessor.service(LinearProcessor.java:139)
        at
org.apache.james.transport.JamesSpoolManager.process(JamesSpoolManager.java:
241)
        at
org.apache.james.transport.JamesSpoolManager.run(JamesSpoolManager.java:208)
        at
org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(Executabl
eRunnable.java:47)
        at
org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread.java:8
0)


Thank you for any help,
Jason



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to