I am using the below Json for posting the Mail using our SAS STUDIO from SAS VIYA 3.5 ENV,. I am getting 200 Response and have received the mail. But not with the attachments. Kindly advise. data test; file mail; put '{' /'"to":' /'[' /'{' /'"address": "sathyaseelan_chandramohan@example.com",' /'"personal": "Example User"' /'}' /'],' /'"from": {' /'"address": "sathyaseelan_chandramohan@example.com"' /'},' /'"subject": "Subject goes here",' /'"htmlMessage": "<html><b>Note:</b>This is an HTML email.</html>",' /'"attachment": [' /'{' /'"type": "application/x-zip",' /'"name": "Summary_SR_20240405_1334.zip",' /'"data": "/tmp/Summary_SR_20240405_1334.zip"' /'}' /']' /'}' run; data _null_; infile mail; input; put _infile_; run; filename resp clear; filename resp temp; options set=SSLREQCERT="allow"; /*Invoke create parent SR API*/ proc http url="https://example.com/mail/messages" method="POST" out=resp CLEAR_CACHE in=mail; debug level=2; headers "Authorization" = "Bearer &access_token" "Content-type" = "application/vnd.sas.mail+json"; run; %put &=SYS_PROCHTTP_STATUS_CODE;
... View more