Official comment
Hi Joe,
The RecipientType value should be just "To" or "CC". You've added the email address to the value.
I hope this helps,
Elad
https://success.clarizen.com/hc/requests/37758
https://api.clarizen.com/V2.0/services/utils/SendEMail
def send_email(self):
data = {'subject': 'email subject',
'body': 'email body',
'recipients':
[
{
'recipientType':
{
'To': 'joe.teumer@mbx.com'
},
'user': 'User/6e8647a3-d3fd-4dcc-8395-
'eMail': 'joe.teumer@mbx.com'
},
],
'relatedEntity': '/Task/
}
response = requests.post(_ApiUrls.Base + _ApiUrls.SendEmail, data=json.dumps(data), headers=self.headers)
result = self._get_api_result(response)
return result
Exception: 500
Error Code : InvalidOperation
Message : Invalid operation: Could not convert to RecipientType
Reference ID : 2DsFajyn9SeLDeQZbBPftc
Hi Joe,
The RecipientType value should be just "To" or "CC". You've added the email address to the value.
I hope this helps,
Elad
Please sign in to leave a comment.
Thanks!
{
"subject" :"Hello Testing Api",
"body" : "Test Mail",
"recipients" : [{"recipientType" : "To",
"user":"/User/f16f63c9-3bb1-4b90-859e-ef1f831d1557",
"eMail":"abc@gmail.com"}],
"relatedEntity" :"/Task/hvrjwovmemdz3iba54fk2ptf386"
}
I tried above body but mail is not coming in my mail box. Its showing 200 response code .Please assist.