[ 
https://issues.apache.org/jira/browse/SYNAPSE-453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Lecho updated SYNAPSE-453:
---------------------------------


Link to forum: 
http://www.nabble.com/Support-for-Mail-Attachments-td19535437.html

> 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: <[EMAIL PROTECTED]>
> Received: from INFOR2 ([192.168.13.175])
>  by posthouse.com (posthouse.com)
>  (MDaemon PRO v10.0.0)
>  with ESMTP id md50000001027.msg
>  for <[EMAIL PROTECTED]>; 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: [EMAIL PROTECTED]
> X-MDRcpt-To: [EMAIL PROTECTED]
> X-MDRemoteIP: 192.168.13.175
> X-Return-Path: [EMAIL PROTECTED]
> X-Envelope-From: [EMAIL PROTECTED]
> X-MDaemon-Deliver-To: [EMAIL PROTECTED]
> Date: Thu, 18 Sep 2008 12:19:26 +0200 (CEST)
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Message-ID: <[EMAIL PROTECTED]>
> 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 
> "<[EMAIL PROTECTED]>") 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to