1. Home
  2. Developer Guide
  3. Rest API
  4. 8. SendEmail

8. SendEmail

  • URL:
« /RestApi/SendEmail»
  • Method: POST
  • URL Settings:
    • authToken [string] [Required]=Authentification Token Id.
    • emailFrom [string] [Required]=The email address of the sender. This setting must have one of these two values: “Org” or “CurrentUser”. If the value is “Org” then the sender’s email will be the one defined on the Organization page of the Configuration menu. If the value is “CurrentUser” then the sender’s email will be the one of the logged in user (the one that enabled the authentication token to be generated).
    • emailTo [string] [Required]=the recipient’s email address (es). If there are several values, separate them with “;”.
    • emailCC [string] [Required]=the email address (es) to be copied. If there are several values, separate them with “;”.
    • emailBCC [string] [Required]=the email address to be cached. If there are several values, separate them with “;”.
    • emailReplyTo [string] [Required]=the email address that will receive the email in case of a response.
    • emailSubject [string] [Required]=the email subject
    • emailIsBodyHtml [boolean] [Required]= allows you to define whether the body of the email is in text or in HTML. Possible values: true or false.
    • enableSsl [boolean] [Required]=allows you to specify whether the connection to the SMTP server must be done in SSL or not. Possible values: true or false.

  • Message body
    • = the body of the email in text or HTML (when emailIsBodyHtml is true)

  • Success Response:
    • Status Code=200 (OK)
  • Error Response:
    • Status Code=400 (BadRequest) (in case there is an error in the data sent in the request)
    • Status Code=400 (Email not sent) : when there is no SMTP server defined on the user (emailFrom = CurrentUser) or on the organization (emailFrom = Org)

Note

  • The SendEmail() method uses the SMTP configuration defined on the Organization page (emailFrom = Org) or on the current user (emailFrom = CurrentUser) in the setup area. If no SMTP server and credentials are defined, the SendEmail() method will return a message “400 Email was not sent”.
  • When enableSsl is set to true, the SendEmail() method uses STARTTLS (usually on port 587). The alternate connection method, sometimes called SMTP/SSL (by default uses port 465), is currently not supported.

Was this article helpful to you? Yes No

How can we help?