1. Home
  2. Developer Guide
  3. Rest API
  4. 9. SendEmailWithAttachments

9. SendEmailWithAttachments

  • 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 to be cached. If there are several values, separate them with “;”.
    • 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.
    • emailBodyAndAttachments [JObject] [Required]=the body and attachments of the email stored in a subject.
  • 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)

Note

The SendEmail () method uses the SMTP configuration defined on the Organization page in the configuration area. If no SMTP server and credentials are defined, the SendEmail () method will default to the SMTP credentials defined at the current user level.

Was this article helpful to you? Yes No

How can we help?