Need some update in send email Documentation

Need some update in send email Documentation

Hi,

I have 2 problems that need to report.

First, as you can see on send email documentation API at this page  https://www.zoho.com/mail/help/api/post-send-an-email.html you can see the Request URL example is in http protocol. When you make some request, the end point server will redirected to https. This is will raise a problem for client request, since redirection will not forward the headers Authorization requests. This is my example code in python:

  1. import request
  2. plyaload = {"fromAddress": "my@domain.com","toAddress": "yours@email.com","subject": "Email - Always and Forever","content": "Email can never be dead."}
  3. headers={'Authorization': 'Zoho-authtoken XXXXXXX'}
  4. url = "http://mail.zoho.com/api/accounts/1234567890/messages"
  5. r = requests.post(url, json=plyaload, headers=headers)
  6. r.status_code
  7. r.json()

This is failed to work. You need change variable url to:

  1. url = "https://mail.zoho.com/api/accounts/1234567890/messages"

Second, mailFormat parameter should be in lowercase: "plaintext" instead of "Plaintext" Other wise it will raise an "PATTERN_NOT_MATCHED" error

thx