2

I have a piece of code, used to send mail using SharePoint Mail utility function, which is working fine.

$.ajax({
    contentType: 'application/json',
    url: urlTemplate,
    type: "POST",
    data: JSON.stringify({
        'properties': {
            '__metadata': {
                'type': 'SP.Utilities.EmailProperties'
            },
            'From': from,
            'To': {
                'results': [to]
            },
            'Body': body,
            'Subject': subject
        }
    }),

I just want to know how can I send same with CCing some one.

4

Just add to your properties.

'CC': {
      'results': [CC]
    },

I hope it helps.

MSDN Reference

  • I want to send email to multiple users in CC. How can i do that? – Akhilesh Jun 7 '18 at 8:16
  • [CC] is a string array. Use like this 'results':["ccuser1@email.com","ccuser2@email.com"] – Vainktesh Kumar Jun 7 '18 at 12:31
1

According to the documentation, there is a CC property you can use for this. Should be able to just add the additional property and set the value the same way you do for to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.