Results 1 to 6 of 6

Thread: Issue in Sending Multiple Attachments in a Forwarded Email

  1. #1
    Join Date
    Dec 2008
    Posts
    16
    Rep Power
    7

    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.

  2. #2
    Join Date
    Sep 2006
    Posts
    252
    Rep Power
    9

    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"

  3. #3
    Join Date
    Dec 2008
    Posts
    16
    Rep Power
    7

    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.

  4. #4
    Join Date
    Sep 2006
    Posts
    252
    Rep Power
    9

    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,

  5. #5
    Join Date
    Dec 2008
    Posts
    16
    Rep Power
    7

    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,

  6. #6
    Join Date
    Sep 2006
    Posts
    252
    Rep Power
    9

    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.

Similar Threads

  1. duplicate email issue
    By kollross in forum Administrators
    Replies: 29
    Last Post: 01-31-2010, 06:43 PM
  2. ZCB Beta 2 / ZCS 5.0.9 - past email sync issue
    By dfriestedt in forum Zimbra Connector for BlackBerry
    Replies: 0
    Last Post: 10-02-2008, 06:00 AM
  3. email sending and management
    By bins in forum Installation
    Replies: 0
    Last Post: 02-14-2008, 04:10 AM
  4. Drag email to calendar and attachments
    By Richard in forum Users
    Replies: 2
    Last Post: 09-14-2006, 01:09 AM
  5. Replies: 3
    Last Post: 08-23-2006, 05:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •