Get Original Message of an Email
Purpose
This API retrieves the MIME representation of an email message.
OAuth Scope
Use the scope
ZohoMail.messages.ALL (or) ZohoMail.messages.READ
to generate the Authtoken.
ALL - Grants full access to messages.
READ - Grants access to read messages.
Request URL
Method: GET
https://mail.zoho.com/api/accounts/{accountId}/messages/{messageId}/originalmessage
Path Parameters
- accountId* long
- This parameter is used to identify the specific account to fetch details.
- This parameter can be retrieved from the Get User Account Details API.
- messageId* long
- This parameter is the unique ID associated with the particular email.
- This parameter can be retrieved from List Emails API.
* - Mandatory parameter
Response Codes
Refer here for the response codes and their meaning.
Sample Request
Copiedcurl "https://mail.zoho.com/api/accounts/12345678/messages/1710915488416100001/originalmessage" \
-X GET \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken *****"
Sample Response
Copied{
"status": {
"code": 200,
"description": "success"
},
"data": {
"messageId": 1711540357880100000,
"content": "Received: from mail.zoho.com by zohomail.com.in\r\n\twith SMTP id 1711540358114380.74134900013746; Wed, 27 Mar 2024 17:22:38 +0530 (IST)\r\nDate: Wed, 27 Mar 2024 17:22:37 +0530\r\nFrom: \"rebecca@zylker.com\" <rebecca@zylker.com>\r\nReply-To: rebecca@zylker.com\r\nTo: \"paula\" <paula@zylker.com>\r\nMessage-Id: <18e7fc14ae8.11615619c4.6313519471843772533@140.com>\r\nSubject: Hello\r\nMIME-Version: 1.0\r\nContent-Type: multipart/alternative; \r\n\tboundary=\"----=_Part_26_875326422.1711540357865\"\r\nImportance: Medium\r\nUser-Agent: Zoho Mail\r\nX-Mailer: Zoho Mail\r\n\r\n------=_Part_26_875326422.1711540357865\r\nContent-Type: text/plain; charset=\"UTF-8\"\r\nContent-Transfer-Encoding: 7bit\r\n\r\nHi\r\n------=_Part_26_875326422.1711540357865\r\nContent-Type: text/html; charset=\"UTF-8\"\r\nContent-Transfer-Encoding: 7bit\r\n\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><html><head><meta content=\"text/html;charset=UTF-8\" http-equiv=\"Content-Type\"></head><body><div style=\"font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;\">Hi</div><br></body></html>\r\n------=_Part_26_875326422.1711540357865--\r\n\r\n"
}
}