synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Lecho (JIRA)" <j...@apache.org>
Subject [jira] Created: (SYNAPSE-453) Support for Mail Attachments
Date Mon, 22 Sep 2008 08:34:45 GMT
Support for Mail Attachments
----------------------------

                 Key: SYNAPSE-453
                 URL: https://issues.apache.org/jira/browse/SYNAPSE-453
             Project: Synapse
          Issue Type: Improvement
            Reporter: Stefan Lecho


I would like to handle mail messages with and without attachments.

In my current configuration, I've defined in the inSequence a Spring-based Mediator. The MessageContext
I'm receiving in the mediate method contains the content of the mail message, but it does
not contain the mail attachment(s).

When an email with an attachment (for instance a PDF document) is triggered by the MailListener,
the attachment should be accessible in the MessageContext. If that is possible, I could for
instance store the PDF document in a database for further treatment.

Based on the stacktrace included underneath I guess that the MailTransportListener reads the
attachment but probably does not initialize it in the MessageContext.

Maybe it is "sufficient" to call addAttachment(DataHandler) on the org.apache.axis2.context.MessageContext
instance created in the processMail method in MailTransportListener ?

Stacktrace
2008-09-18 12:19:39,428 [192.168.13.175-INFOR2] [mailto-Worker-6] DEBUG MailTransportListener
1 messgaes in folder : INBOX
A7 FETCH 1 (FLAGS)
* 1 FETCH (FLAGS (\Recent))
A7 OK FETCH completed
A8 FETCH 1 (BODYSTRUCTURE)
* 1 FETCH (BODYSTRUCTURE ((("text" "plain" ("charset" "us-ascii") NIL NIL "7bit" 46 1 NIL
NIL NIL) "related" ("boundary" "----=_Part_1_14721926.1221733166287") NIL NIL)("application"
"octet-stream" ("name" "This is an attachment") NIL NIL "base64" 22476 NIL ("attachment" ("filename"
"This is an attachment")) NIL) "mixed" ("boundary" "----=_Part_0_3794357.1221733166256") NIL
NIL))
A8 OK FETCH completed
A9 FETCH 1 (BODY.PEEK[HEADER])
* 1 FETCH (BODY[HEADER] {927}
Return-path: <bank.out@posthouse.com>
Received: from INFOR2 ([192.168.13.175])
 by posthouse.com (posthouse.com)
 (MDaemon PRO v10.0.0)
 with ESMTP id md50000001027.msg
 for <credoc.in@posthouse.com>; Thu, 18 Sep 2008 12:19:14 +0200
X-Spam-Processed: posthouse.com, Thu, 18 Sep 2008 12:19:14 +0200
 (not processed: spam filter heuristic analysis disabled)
X-Rcpt-To: credoc.in@posthouse.com
X-MDRcpt-To: credoc.in@posthouse.com
X-MDRemoteIP: 192.168.13.175
X-Return-Path: bank.out@posthouse.com
X-Envelope-From: bank.out@posthouse.com
X-MDaemon-Deliver-To: credoc.in@posthouse.com
Date: Thu, 18 Sep 2008 12:19:26 +0200 (CEST)
From: bank.out@posthouse.com
To: credoc.in@posthouse.com
Message-ID: <849515.01221733166569.JavaMail.Cscdev4@INFOR2>
Subject: WSO2ESB - The subject of the mail - with an attachment !
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----=_Part_0_3794357.1221733166256"
 
)
A9 OK FETCH completed
2008-09-18 12:19:39,491 [192.168.13.175-INFOR2] [mailto-Worker-6] DEBUG MailTransportListener
Processing message as Content-Type : multipart/mixed; boundary="----=_Part_0_3794357.1221733166256"
A10 FETCH 1 (ENVELOPE INTERNALDATE RFC822.SIZE)
* 1 FETCH (ENVELOPE ("Thu, 18 Sep 2008 12:19:26 +0200 (CEST)" "WSO2ESB - The subject of the
mail - with an attachment !" ((NIL NIL "bank.out" "posthouse.com")) ((NIL NIL "bank.out" "posthouse.com"))
((NIL NIL "bank.out" "posthouse.com")) ((NIL NIL "credoc.in" "posthouse.com")) NIL NIL NIL
"<849515.01221733166569.JavaMail.Cscdev4@INFOR2>") INTERNALDATE "18-Sep-2008 12:19:14
+0200" RFC822.SIZE 23992)
A10 OK FETCH completed
A11 FETCH 1 (BODY[1.1]<0.46>)
* 1 FETCH (BODY[1.1]<0> {46}
A text message for WSO2 - with an attachment ! FLAGS (\Seen \Recent))
A11 OK FETCH completed

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Mime
View raw message