What API can I use to pull/read only new email messages (in XML or JSON)"
What API can I use to pull/read only new email messages (in XML or JSON)"
What API can I use to pull/read only new email messages (in XML or JSON)"
Can't seem to find a right API. I was looking at: http://server/home/username/?fmt=XML&query="in:inbox is:unread", but not sure if this is the correct one
Also can't seem to find online a sample of email messages that are returned
Please help, thanks!
Shawn
Can't seem to find a right API. I was looking at: http://server/home/username/?fmt=XML&query="in:inbox is:unread", but not sure if this is the correct one
Also can't seem to find online a sample of email messages that are returned
Please help, thanks!
Shawn
- barrydegraaff
- Zimbra Employee
- Posts: 242
- Joined: Tue Jun 17, 2014 3:31 am
- Contact:
Re: What API can I use to pull/read only new email messages (in XML or JSON)"
This should do
https://zimbra.example.com/home/usernam ... =is:unread
More details:
https://wiki.zimbra.com/wiki/Zimbra_RES ... Get_Folder
https://zimbra.example.com/home/usernam ... =is:unread
More details:
https://wiki.zimbra.com/wiki/Zimbra_RES ... Get_Folder
--
Barry de Graaff
Email: barry.degraaff [at] synacor [dot] com
Admin of Zimbra-Community Github: https://github.com/orgs/Zimbra-Community/ and the
Zimlet Gallery https://gallery.zetalliance.org/extend/
Barry de Graaff
Email: barry.degraaff [at] synacor [dot] com
Admin of Zimbra-Community Github: https://github.com/orgs/Zimbra-Community/ and the
Zimlet Gallery https://gallery.zetalliance.org/extend/
- barrydegraaff
- Zimbra Employee
- Posts: 242
- Joined: Tue Jun 17, 2014 3:31 am
- Contact:
Re: What API can I use to pull/read only new email messages (in XML or JSON)"
Response looks like attached:
- Attachments
-
- Screenshot from 2023-02-08 17-28-49.png (141.79 KiB) Viewed 3978 times
--
Barry de Graaff
Email: barry.degraaff [at] synacor [dot] com
Admin of Zimbra-Community Github: https://github.com/orgs/Zimbra-Community/ and the
Zimlet Gallery https://gallery.zetalliance.org/extend/
Barry de Graaff
Email: barry.degraaff [at] synacor [dot] com
Admin of Zimbra-Community Github: https://github.com/orgs/Zimbra-Community/ and the
Zimlet Gallery https://gallery.zetalliance.org/extend/
Re: What API can I use to pull/read only new email messages (in XML or JSON)"
Thanks, Barry for the help!
I can't seem to be able to access the example.com link: https://zimbra.example.com/home/username
And looking at the attached xml response, how can I tell which elements are for From, To, Subject, Date/Time Received and email Body? (I can't seem to find where in documentation these elements are defined in xml/json email messages)
Thanks, again!
I can't seem to be able to access the example.com link: https://zimbra.example.com/home/username
And looking at the attached xml response, how can I tell which elements are for From, To, Subject, Date/Time Received and email Body? (I can't seem to find where in documentation these elements are defined in xml/json email messages)
Thanks, again!
Re: What API can I use to pull/read only new email messages (in XML or JSON)"
And I'd appreciate it if there is sample code (can't seem to access https://zimbra.example.com/home) to call API: http://server_name/home/account_name/inbox?fmt=xml&query=is:unread
in a .NET C# application
And is the account_name the same as Zimbra email address?
Thanks!
Shawn
in a .NET C# application
And is the account_name the same as Zimbra email address?
Thanks!
Shawn
- L. Mark Stone
- Ambassador
- Posts: 2802
- Joined: Wed Oct 09, 2013 11:35 am
- Location: Portland, Maine, US
- ZCS/ZD Version: 10.0.7 Network Edition
- Contact:
Re: What API can I use to pull/read only new email messages (in XML or JSON)"
Please replace the fqdn zimbra.example.com with the fqdn of your Zimbra server.shawns wrote:Thanks, Barry for the help!
I can't seem to be able to access the example.com link: https://zimbra.example.com/home/username
And looking at the attached xml response, how can I tell which elements are for From, To, Subject, Date/Time Received and email Body? (I can't seem to find where in documentation these elements are defined in xml/json email messages)
Thanks, again!
Hope that helps,
Mark
___________________________________
L. Mark Stone
Mission Critical Email - Zimbra VAR/BSP/Training Partner https://www.missioncriticalemail.com/
AWS Certified Solutions Architect-Associate
L. Mark Stone
Mission Critical Email - Zimbra VAR/BSP/Training Partner https://www.missioncriticalemail.com/
AWS Certified Solutions Architect-Associate
Re: What API can I use to pull/read only new email messages (in XML or JSON)"
Isn't there a link to see some sample .NET code that can call Zimbra APIs?
I just need sample C# code that can call a Zimbra API like 'http://server_name/home/account_name'
Thanks!
I just need sample C# code that can call a Zimbra API like 'http://server_name/home/account_name'
Thanks!
- L. Mark Stone
- Ambassador
- Posts: 2802
- Joined: Wed Oct 09, 2013 11:35 am
- Location: Portland, Maine, US
- ZCS/ZD Version: 10.0.7 Network Edition
- Contact:
Re: What API can I use to pull/read only new email messages (in XML or JSON)"
shawns wrote:Isn't there a link to see some sample .NET code that can call Zimbra APIs?
I just need sample C# code that can call a Zimbra API like 'http://server_name/home/account_name'
Thanks!
No samples to my knowledge. How you choose to make use of https://wiki.zimbra.com/wiki/Zimbra_REST_API_Reference is up to you.
___________________________________
L. Mark Stone
Mission Critical Email - Zimbra VAR/BSP/Training Partner https://www.missioncriticalemail.com/
AWS Certified Solutions Architect-Associate
L. Mark Stone
Mission Critical Email - Zimbra VAR/BSP/Training Partner https://www.missioncriticalemail.com/
AWS Certified Solutions Architect-Associate
Re: What API can I use to pull/read only new email messages (in XML or JSON)"
Hi Mark, Can I ask this?
When I access http API (http://servername/home/username/inbox?f ... =is:unread), I get an error - "Unable to connect to the remote server". When I access https API (https://servername/home/username/inbox? ... =is:unread), I get an error - "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel". Does this mean I need to provide a credential to the https API, and if yes, how do I provide a credential to the https API call?
Thanks,
Shawn
When I access http API (http://servername/home/username/inbox?f ... =is:unread), I get an error - "Unable to connect to the remote server". When I access https API (https://servername/home/username/inbox? ... =is:unread), I get an error - "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel". Does this mean I need to provide a credential to the https API, and if yes, how do I provide a credential to the https API call?
Thanks,
Shawn
- L. Mark Stone
- Ambassador
- Posts: 2802
- Joined: Wed Oct 09, 2013 11:35 am
- Location: Portland, Maine, US
- ZCS/ZD Version: 10.0.7 Network Edition
- Contact:
Re: What API can I use to pull/read only new email messages (in XML or JSON)"
Hi Shawn,shawns wrote:Hi Mark, Can I ask this?
When I access http API (http://servername/home/username/inbox?f ... =is:unread), I get an error - "Unable to connect to the remote server". When I access https API (https://servername/home/username/inbox? ... =is:unread), I get an error - "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel". Does this mean I need to provide a credential to the https API, and if yes, how do I provide a credential to the https API call?
Thanks,
Shawn
I'm not a developer but yes, you do need an authentication token. I believe this is discussed somewhere in the https://wiki.zimbra.com/wiki/Zimbra_REST_API_Reference
Hope that helps!
Mark
___________________________________
L. Mark Stone
Mission Critical Email - Zimbra VAR/BSP/Training Partner https://www.missioncriticalemail.com/
AWS Certified Solutions Architect-Associate
L. Mark Stone
Mission Critical Email - Zimbra VAR/BSP/Training Partner https://www.missioncriticalemail.com/
AWS Certified Solutions Architect-Associate