Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-05-2009, 05:41 PM
Intermediate Member
 
Posts: 16
Default Issue in Sending Multiple Attachments in a Forwarded Email

Hi,

I am trying to forward an email that has 2 attachments using SOAP API. Here is the SOAP msg looks like:

Code:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
        <context xmlns="urn:zimbra">
            <authToken>123456</authToken>
        </context>
    </soap:Header>
    <soap:Body>
        <SendMsgRequest xmlns="urn:zimbraMail">
           <m origid="323" rt="w">
              <e t="f" a="tester@zim.test.com"/>
              <e t="t" a="testToer@simple.com"/>
              <su>FW: Test-2</su>
              <mp ct="text/plain">
                  <content>Test FW</content>
              </mp>
              <attach aid="1234, 5678">
                  <m id="323"/>
              </attach>
          </m>
        </SendMsgRequest>
    </soap:Body>
</soap:Envelope>
I'm getting only the new body not the original body and also I'm not able to get the 2nd attachment. If the change attach TAG to different way as follows:
Code:
<attach>
    <m id="323"/>
</attach>
then I'm getting the original email as attachment not as in-line. If I change attach TAG as follows:
Code:
<attach aid="1234">
    <m id="323"/>
</attach>
then I'm not getting the original msg, but I'm getting only the attachment which was uploaded(1234).

Could anybody please tell me what I'm doing wrong and how to forward an email with multiple attachments and in-line original body with new body?

Thanks a lot for help.
- VistoPartner.
Reply With Quote
  #2 (permalink)  
Old 03-05-2009, 06:05 PM
Project Contributor
 
Posts: 252
Default

Hmm... i don't understand exactly what you say about the message body but i can say that your aid for the attachment is not looking correctly.

From what i know it's a par conformed of the client token and the server token:

aid="client_token:server_token" with the ":" as a separator. For more than one attachment:

aid="client_token:server_token,client_token2:serve r_token2"
Reply With Quote
  #3 (permalink)  
Old 03-05-2009, 07:19 PM
Intermediate Member
 
Posts: 16
Default

Thanks fernandoflorez for quick reply.

I have correct aid value actually, but here I posted for simplicity a value. The real aid="69e376e6-8f18-4b37-b284-d1271a1781ac:d0b45291-ebe3-4d26-aa8b-524069c9a16d"

I have 2 of them and I created attach TAG with 2 aid values as follows:

<attach aid="69e376e6-8f18-4b37-b284-d1271a1781ac:d0b45291-ebe3-4d26-aa8b-524069c9a16d,69e376e6-8f18-4b37-b284-d1271a1781ac:a7246d0d-684f-4be5-a361-c73b41631856"><m id="323"/></attach>

But I'm getting only the 1st attachment.

When I forward a email, it should appear something as follows:

From: <...>
To: <...>
Subject: <...>

New text/HTML Body of the current Email

------- Original Message --------
From: <...>
To: <...>
Subject: <....>

As mentioned above, the original full email should be attached as in-line text to the current email that is being forwarded.

But in my case using zimbra SOAP API, I'm not getting the bottom portion which is the original message as in-line text.

Hope this helps in clarifying the question.
Hoping to get some solution or reply.

Thaking You,
- VistoPartner.
Reply With Quote
  #4 (permalink)  
Old 03-05-2009, 07:42 PM
Project Contributor
 
Posts: 252
Default

zimbra server won't inject the message replied to the body. You need to do that manually.

1) GetMessageRequest
2) Format the body with the other message body
3) SendMessageRequest

No idea why you are not receiving both attachments. Have you tried a normal form to see if both attachments still exist on server?

How is your sendmessageresponse?

Thanks,
Reply With Quote
  #5 (permalink)  
Old 03-06-2009, 10:38 AM
Intermediate Member
 
Posts: 16
Default

Ok, I thought zimbra will handle reply and forward, because in the SendMsgRequest we have to specify the origid for reply and forward. If zimbra doesn't support automatic appending of Original Email's body to the replied/forwarded mail's body, I don;t understand why we have to specify origid.

AS given in soap.txt:
-----------------------------------
+ on reply/forward, set origid on <m> element and set rt to "r" or "w", respectively

<SendMsgRequest [suid="{send-uid}"] [needCalendarSentByFixup="0|1"] [noSave="0|1"]>
<m [origid="..." rt="r|w"] [idnt="{identity-id}"]>
------------------------------------

Thanking You,
Reply With Quote
  #6 (permalink)  
Old 03-06-2009, 02:25 PM
Project Contributor
 
Posts: 252
Default

hmm... no idea but origid could be for threading? No idea.

From what i see they include the replied content on the body of the new mail.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.