POST - To Send an Email 

 Purpose

The API is used to Send an Email. 

 Request URL 

https://mail.zoho.com/api/accounts/<accountId>/messages

Note: You can use the API here to retrieve the accountid for the currently authenitcated user.

 Request Parameters

ParameterData TypeDescription
accountId*LongaccountID - The unique Zoho Account number associated with the particular account.

* - Mandatory parameters

  Request Body (JSON Object)

ParameterData TypeAllowed ValuesDescription
fromAddress*StringValid from email address corresponding to the account Sender's email address for the From field (associated to the authenticated account)
toAddress*String

Valid recipient email address for the To field

Recipient email address for the To field
ccAddressStringValid recipient email address for the Cc fieldRecipient email address for the Cc field
bccAddressStringValid recipient email address for the Bcc fieldRecipient email address for the Bcc field
subjectString-Subject of the email that should be sent 
encodingString

Default value is UTF-8. Other allowed encoding values are listed below

  • Big5
  • EUC-JP
  • EUC-KR
  • GB2312
  • ISO-2022-JP
  • ISO-8859-1
  • KOI8-R
  • Shift_JIS
  • US-ASCII
  • UTF-8
  • WINDOWS-1251
  • X-WINDOWS-ISO2022JP
The encoding that is to be used in the email content. 
mailFormatString
  • html
  • plaintext
Whether the email should be sent in HTML format or in plain text. The default value is html
askReceiptString"Yes"Whether you need to request Read receipt from the recipient. If required, enter the value as "yes".

* - Mandatory parameters

Schedule emails

With this API you can also schedule when to send your email. To schedule an email, follow the same procedure as above along with the upcoming additional parameters.

ParameterData TypeAllowed ValuesDescription
isSchedule*BooleanTrueAdd this parameter to schedule when to send your email.
scheduleType*Int
1/2/3/4/5/6"1" - Schedules email to be sent after one hour from the time of the request.
"2" - Schedules email to be sent after two hours from the time of the request.
"3" - Schedules email to be sent after four hours from the time of the request.
"4" - Schedules email to be sent by the morning of the next day from the time of the request.
"5" - Schedules email to be sent by the afternoon of the next day from the time of the request.
"6" - Choose custom date and time of your choice.
timeZoneString( GMT 5:30 ) India Standard Time(Asia/Calcutta)Enter the timezone you want to use for scheduling your email. This field is mandatory if you chose value 6 in the scheduleType parameter.
scheduleTimedateTimeMM/DD/YYYY HH:MMEnter the date and time you want to schedule your email. This field is mandatory if you chose value 6 in the scheduleType parameter.

* - Mandatory parameters

 Response Codes

Please refer Response Codes.

Sample Request (Request Body)

Copied{
   "fromAddress": "my@mydomain.com",
   "toAddress": "family@mydomain.com",
   "ccAddress": "colleagues@mywork.com",
   "bccAddress": "restadmin1@restapi.com",
   "subject": "Email - Always and Forever",
   "content": "Email can never be dead. The most neutral and effective way, that can be used for one to many and two way communication.",
   "askReceipt" : "yes"
}