Skip to content

Reference Email

Benedikt Schulze Baek edited this page Feb 15, 2017 · 3 revisions

Send email

This method allows you to send emails to users and UAC groups. On success you will receive an object containing the number of mails sent. You need to provide a list containing either UserIds or UacGroupIds. HTML can be used in this mailing. On success the http status 'created' will be returned.

POST https://api.chayns.net/v2.0/{LocationID}/Email

Snippet

Permissions
'PublicInfo', 'UserInfo', 'SeeUAC', 'Email'

Header
Authorization: Basic {TappId}:{Secret}

The part 'TappID:Secret' has to be Base64 encoded.

Body

  • Headline : string - The headline of the mail.
  • Text : string - The text of the mail.
  • Greeting : string - A closing line (i.e. 'Sincerely..').
  • Subject : string - The subject of the mail.
  • UacIds (optional) : int[] - Recipient list containing UAC groupIds.
  • UserIds (optional) : int[] - Recipient list containing userIds.

Parameter

  • LocationID : int - Can be found in chayns.env.site.
  • TappID : int - Can be found in chayns.env.site.tapp

Result

  • success : boolean - An indicator for whether the action was successful.
  • postedMails : int - A counter for how much mails were send.
Clone this wiki locally