Hello everybody,

I just would like to ask you a quick question ( well...I hope it is) about
the mail transport implemented in WSO2...It was impossible for me to found
this response...

Currently I'm using the "mailto"  transport as a Pop3 listener, so I can
capture all the mails sent and received...In fact, this seems to work
well...

But I have a problem that i'm not sure if its not possible or maybe ( most
probably ) I'm missing something...
My  Service Proxy, which uses the mailtoTransport, receives the Body of the
mime message ($body/m0:text ) , but I'm not able to get the whole message (
with all MIME headers ) in a easy way...

To achieve this, I have had to use the PayLoadFactory and build my own mime
message from the parsed headers...

But....is there a way to read the original mime message? I just need to do
a "pass through" proxy with the original message, but attached to a POP3
listener...

My proxy has this XML code: ( I think it's not the best way.....)

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse";
       name="PopReceiverProxy"
       transports="mailto"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target>
      <inSequence>

         <property name="OUT_ONLY" value="true"/>
         <header name="Action" action="remove"/>
         <property name="SOAPAction" scope="transport" action="remove"/>
         <payloadFactory media-type="xml">
            <format>
               <p:classifyEmail xmlns:p="http://ws.misc.medprive.com/";>
                  <arg0 xmlns="">Date: $1
Message-ID: $2
Subject: $3
From: $4
To: $5
Cc: $6
Content-Type: $7

$8</arg0>
               </p:classifyEmail>
            </format>
            <args>
               <arg evaluator="xml"
expression="get-property('transport','Date')"/>
               <arg evaluator="xml"
expression="get-property('transport','Message-ID')"/>
               <arg evaluator="xml"
expression="get-property('transport','Subject')"/>
               <arg evaluator="xml"
expression="get-property('transport','From')"/>
               <arg evaluator="xml"
expression="get-property('transport','To')"/>
               <arg evaluator="xml"
expression="get-property('transport','Cc')"/>
               <arg evaluator="xml"
expression="get-property('transport','Content-Type')"/>
               <arg xmlns:m0="http://ws.apache.org/commons/ns/payload";
                    evaluator="xml"
                    expression="$body/m0:text"/>
            </args>
         </payloadFactory>
      </inSequence>
      [..]
   </target>
   <parameter
name="transport.mail.PreserveHeaders">Date,Subject,To,Cc,From,Content-Type,Message-ID</parameter>
   <parameter
name="transport.mail.ContentType">text/plain;charset=UTF-8</parameter>
   [...]
   <description/>
</proxy>

Thank you very much and sorry for the inconvenience.
-- 
Ivan Fontanals



-- 
Ivan Fontanals
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to