How to used Zimbra API ?

Have a great idea for extending Zimbra? Share ideas, ask questions, contribute, and get feedback.
thang-mt
Posts: 14
Joined: Mon Jan 17, 2022 2:05 pm

Re: How to used Zimbra API ?

Post by thang-mt »

jholder wrote:
thang-mt wrote: when i send with this content, it is no get content form file my html
result to display

Code: Select all

{"Header":{"context":{"change":{"token":4623},"_jsns":"urn:zimbra"}},"Body":{"Fault":{"Code":{"Value":"soap:Sender"},"Reason":{"Text":"SMTP server reported: No recipient addresses"},"Detail":{"Error":{"Code":"mail.SEND_FAILURE","Trace":"qtp2076287037-48850:1644331332009:181f582faf258d11","_jsns":"urn:zimbra"}}}},"_jsns":"urn:zimbraSoap"}
Can you have example? Thanks
Maybe this will help:

Code: Select all

  "Body": {
    "SendMsgRequest": {
      "_jsns": "urn:zimbraMail",
      "suid": 1645083200491,
      "m": {
        "id": "xx",
        "did": "xxx",
        "idnt": "xx-xx-xxx",
        "e": [
          {
            "t": "t",
            "a": "TO_ADDR@synacor.com"
          },
          {
            "t": "f",
            "a": "jholder@zimbra.com",
            "p": "John  Holder"
          }
        ],
        "su": {
          "_content": "[MY HTML CONTENT]"
        },
        "mp": [
          {
            "ct": "multipart/alternative",
            "mp": [
              {
                "ct": "text/plain",
                "content": {
                  "_content": "[MY PLAINTEXT CONTENT]"
                }
              },
              {
                "ct": "text/html",
                "content": {
                  "_content": "BODY"
                }
              }
            ]
          }
        ]
      }
    }
  }
}
Dear jholder
Thank you reply.
But my mail body is need to get from an html or php file. Here I am seeing you write a long content here, right?
User avatar
Oldfart423
Posts: 16
Joined: Tue Aug 02, 2022 9:47 pm
Location: US
ZCS/ZD Version: 10.0.8 OSE (Lab test platform)

Re: How to used Zimbra API ?

Post by Oldfart423 »

Old thread, but I wanted to thank Jeastman for stepping through the process. Helped me out a ton!
Thanks!
Post Reply