<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I send email using VIYA REST api? in SAS Viya</title>
    <link>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/854080#M1623</link>
    <description>Thanks a lot! I have it working. By the way, .. 'from' address can't be overruled. It is immutably configured in VIYA.&lt;BR /&gt;Is all this documented anywhere?&lt;BR /&gt;&lt;BR /&gt;Thanks again,&lt;BR /&gt;Gérold</description>
    <pubDate>Tue, 17 Jan 2023 12:48:40 GMT</pubDate>
    <dc:creator>geroldpw</dc:creator>
    <dc:date>2023-01-17T12:48:40Z</dc:date>
    <item>
      <title>How do I send email using VIYA REST api?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/853961#M1619</link>
      <description>&lt;P&gt;When trying to send email through the VIYA REST api from a shell script I get the following message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;{"version":2,"httpStatusCode":400,"message":"The request body was missing or invalid.",&lt;BR /&gt;"details":["path: /mail/messages","correlator: 70862b93-1626-4763-ad6d-b7d5d6e1032e"]}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This&amp;nbsp; is how I issue the request:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;curl -s -k -X POST "$base_url/mail/messages" \
     -H "Authorization: Bearer $IDTOKEN" \
     -H 'Content-Type: application/vnd.sas.mail+json' \
     -d '{
       "to":"me@email.adres",
       "subject":"testmail door Gerold van viya LTEST",
       "message":"Deze mail wordt verstuurd met de VIYA REST API"
     }'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I can't find documentation on the data part of the request. Documetation only mentions to have the three fields. I tried making the "message" field a list but that doesn't work either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 09:01:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/853961#M1619</guid>
      <dc:creator>geroldpw</dc:creator>
      <dc:date>2023-01-16T09:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do I send email using VIYA REST api?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/854076#M1621</link>
      <description>The format for the data would be (you could also use "textMessage" instead of "htmlMessage" for a message in plain text):&lt;BR /&gt;{&lt;BR /&gt;  "to": [&lt;BR /&gt;    {&lt;BR /&gt;      "address": "user@example.com",&lt;BR /&gt;      "personal": "Example User"&lt;BR /&gt;    }&lt;BR /&gt;  ],&lt;BR /&gt;  "from": {&lt;BR /&gt;    "address": "from@example.com"&lt;BR /&gt;  },&lt;BR /&gt;  "subject": "Subject goes here",&lt;BR /&gt;  "htmlMessage": "&amp;lt;html&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt;This is an HTML email.&amp;lt;/html&amp;gt;"&lt;BR /&gt;}</description>
      <pubDate>Tue, 17 Jan 2023 12:23:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/854076#M1621</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2023-01-17T12:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I send email using VIYA REST api?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/854080#M1623</link>
      <description>Thanks a lot! I have it working. By the way, .. 'from' address can't be overruled. It is immutably configured in VIYA.&lt;BR /&gt;Is all this documented anywhere?&lt;BR /&gt;&lt;BR /&gt;Thanks again,&lt;BR /&gt;Gérold</description>
      <pubDate>Tue, 17 Jan 2023 12:48:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/854080#M1623</guid>
      <dc:creator>geroldpw</dc:creator>
      <dc:date>2023-01-17T12:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I send email using VIYA REST api?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/854151#M1624</link>
      <description>The mail service API is not currently documented.</description>
      <pubDate>Tue, 17 Jan 2023 17:09:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/854151#M1624</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2023-01-17T17:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I send email using VIYA REST api?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/910601#M2194</link>
      <description>&lt;P&gt;Mr. Gwooton,&lt;/P&gt;
&lt;P&gt;how can i use this with starttls, the example is not working with starttls eventhough we have mail.smtp.starttls.enable : true in configuration.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example error output :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;{"version":2,"httpStatusCode":400,"errorCode":11104,"message":"Couldn't connect to host, port: OURSMTPSERVER, 25; timeout -1","details":["Caused by gomail: could not send email 1: 530 #5.7.0 Must issue a STARTTLS command first","path: /mail/messages","correlator: f965315d-08e9-4af1-bf19-e4227f7fda74"]}sh-4.4$&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 13:26:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/910601#M2194</guid>
      <dc:creator>paterd2</dc:creator>
      <dc:date>2024-01-05T13:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I send email using VIYA REST api?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/910611#M2195</link>
      <description>How did you set mail.smtp.starttls.enable? In sas.mail configuration under customProperties? It sounds like this is not being honored.</description>
      <pubDate>Fri, 05 Jan 2024 14:05:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/910611#M2195</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2024-01-05T14:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do I send email using VIYA REST api?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/910612#M2196</link>
      <description>&lt;P&gt;Yes we did this.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 14:07:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/910612#M2196</guid>
      <dc:creator>paterd2</dc:creator>
      <dc:date>2024-01-05T14:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I send email using VIYA REST api?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/910614#M2197</link>
      <description>Have you tried using the secure TLS ports (587 or 465) instead?</description>
      <pubDate>Fri, 05 Jan 2024 14:10:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/910614#M2197</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2024-01-05T14:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I send email using VIYA REST api?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/910615#M2198</link>
      <description>We do not have these ports open, but if I lauch it with curl directly it works fine with --ssl-reqd on port 25.&lt;BR /&gt;even if I mail from studio, with starttls it works fine.</description>
      <pubDate>Fri, 05 Jan 2024 14:20:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/910615#M2198</guid>
      <dc:creator>paterd2</dc:creator>
      <dc:date>2024-01-05T14:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I send email using VIYA REST api?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/910638#M2199</link>
      <description>You should engage SAS Technical Support to have them take a look at your configuration.</description>
      <pubDate>Fri, 05 Jan 2024 16:40:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/910638#M2199</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2024-01-05T16:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I send email using VIYA REST api?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/921263#M2294</link>
      <description>&lt;P&gt;Greg,&lt;/P&gt;
&lt;P&gt;this is what I sended to support today.&lt;/P&gt;
&lt;P&gt;Dear Support,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;eureka !&lt;/P&gt;
&lt;P&gt;I found a workaround by accident .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I saw that we have DEBUG=true as optional parameter.&lt;/P&gt;
&lt;DIV class="sapUiFormResGridLastContXL sapUiFormResGridLastContL sapUiFormResGridLastContM sapUiFormResGridFirstRowXL sapUiFormResGridFirstRowL sapUiFormResGridFirstRowM sapUiRespGridSpanL12 sapUiRespGridSpanM12 sapUiRespGridSpanS12 sapUiRespGridSpanXL12"&gt;
&lt;DIV id="__container40--Grid" class="sapUiFormResGridCont sapUiRespGrid sapUiRespGridHSpace0 sapUiRespGridMedia-Std-LargeDesktop sapUiRespGridOverflowHidden sapUiRespGridVSpace0" data-sap-ui="__container40--Grid"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="sapUiFormResGridLastContXL sapUiFormResGridLastContL sapUiFormResGridLastContM sapUiFormResGridLastRowXL sapUiFormResGridLastRowL sapUiFormResGridLastRowM sapUiRespGridSpanL12 sapUiRespGridSpanM12 sapUiRespGridSpanS12 sapUiRespGridSpanXL12"&gt;
&lt;DIV id="__container39--Grid" class="sapUiFormResGridCont sapUiRespGrid sapUiRespGridHSpace0 sapUiRespGridMedia-Std-LargeDesktop sapUiRespGridOverflowHidden sapUiRespGridVSpace0" data-sap-ui="__container39--Grid"&gt;
&lt;DIV class="sapUiFormElementLbl sapUiRespGridBreak sapUiRespGridSpanL3 sapUiRespGridSpanM3 sapUiRespGridSpanS12 sapUiRespGridSpanXL3"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sapUiRespGridSpanL9 sapUiRespGridSpanM9 sapUiRespGridSpanS12 sapUiRespGridSpanXL9"&gt;
&lt;DIV id="__field103" class="sapMFlexBox sapMFlexBoxAlignContentStretch sapMFlexBoxAlignItemsStretch sapMFlexBoxBGTransparent sapMFlexBoxJustifyStart sapMFlexBoxWrapNoWrap sapMHBox sasEVConfigCustomField" data-sap-ui="__field103"&gt;
&lt;DIV id="__data177" class="sapMFlexBoxBGTransparent sapMFlexItem sapMFlexItemAlignAuto"&gt;
&lt;DIV id="__input83" class="sapMInput sapMInputBase sapMInputBaseHeightMargin sapMInputBaseReadonly sasMInputBaseHasContent" data-sap-ui="__input83"&gt;
&lt;DIV id="__input83-content" class="sapMInputBaseContentWrapper sapMInputBaseReadonlyWrapper"&gt;&lt;SPAN&gt;I removed it, and the sas-mail pod was not able to start.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;I added DEBUG=true and the pod started again.&lt;/P&gt;
&lt;P&gt;Then today I had a brainwave.&lt;/P&gt;
&lt;P&gt;I changed DEBUG=true in ...... mail.smtp.starttls.enable=true.&lt;/P&gt;
&lt;DIV class="sapUiFormResGridLastContXL sapUiFormResGridLastContL sapUiFormResGridLastContM sapUiFormResGridFirstRowXL sapUiFormResGridFirstRowL sapUiFormResGridFirstRowM sapUiRespGridSpanL12 sapUiRespGridSpanM12 sapUiRespGridSpanS12 sapUiRespGridSpanXL12"&gt;
&lt;DIV id="__container40--Grid" class="sapUiFormResGridCont sapUiRespGrid sapUiRespGridHSpace0 sapUiRespGridMedia-Std-LargeDesktop sapUiRespGridOverflowHidden sapUiRespGridVSpace0" data-sap-ui="__container40--Grid"&gt;
&lt;DIV class="sapUiRespGridBreak sapUiRespGridSpanL12 sapUiRespGridSpanM12 sapUiRespGridSpanS12 sapUiRespGridSpanXL12"&gt;&lt;LABEL id="__label275" class="sapMLabel sapMLabelMaxWidth sasMLabel sasMLabelStd sasMLabelWrapped" data-sap-ui="__label275"&gt;&lt;SPAN class="sasMLabelText"&gt;Optional custom properties set on the remote mail server.&lt;/SPAN&gt;&lt;/LABEL&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="sapUiFormResGridLastContXL sapUiFormResGridLastContL sapUiFormResGridLastContM sapUiFormResGridLastRowXL sapUiFormResGridLastRowL sapUiFormResGridLastRowM sapUiRespGridSpanL12 sapUiRespGridSpanM12 sapUiRespGridSpanS12 sapUiRespGridSpanXL12"&gt;
&lt;DIV id="__container39--Grid" class="sapUiFormResGridCont sapUiRespGrid sapUiRespGridHSpace0 sapUiRespGridMedia-Std-LargeDesktop sapUiRespGridOverflowHidden sapUiRespGridVSpace0" data-sap-ui="__container39--Grid"&gt;
&lt;DIV class="sapUiFormElementLbl sapUiRespGridBreak sapUiRespGridSpanL3 sapUiRespGridSpanM3 sapUiRespGridSpanS12 sapUiRespGridSpanXL3"&gt;&lt;LABEL id="__label276" class="sapMLabel sapMLabelMaxWidth sasEVConfigPropertyLabel sasMLabel sasMLabelStd sasMLabelWrapped" for="__input83" data-sap-ui="__label276"&gt;&lt;SPAN class="sasMLabelText"&gt;mail.smtp.starttls.enable: true&lt;/SPAN&gt;&lt;/LABEL&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;IT WORKS !!!!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 09:12:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/921263#M2294</guid>
      <dc:creator>paterd2</dc:creator>
      <dc:date>2024-03-21T09:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I send email using VIYA REST api?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/921266#M2295</link>
      <description>Excuse me :&lt;BR /&gt;Not optional but properties.&lt;BR /&gt;&lt;BR /&gt;properties:&lt;BR /&gt;mail.smtp.starttls.enable=true&lt;BR /&gt;(Deprecated) Optional properties set on the remote mail server.</description>
      <pubDate>Thu, 21 Mar 2024 09:26:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/921266#M2295</guid>
      <dc:creator>paterd2</dc:creator>
      <dc:date>2024-03-21T09:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do I send email using VIYA REST api?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/921296#M2296</link>
      <description>Great news! I'm pleased to hear you got it working. &lt;BR /&gt;&lt;BR /&gt;So you modified the mail.debug=false set by default in the deprecated properties field (that had been changed to true in your case) to mail.smtp.starttls.enable=true and it picked it up?</description>
      <pubDate>Thu, 21 Mar 2024 13:59:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/921296#M2296</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2024-03-21T13:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I send email using VIYA REST api?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/921664#M2303</link>
      <description>&lt;P&gt;Greg, exactly !&lt;/P&gt;
&lt;P&gt;Regards.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dik&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 07:22:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/921664#M2303</guid>
      <dc:creator>paterd2</dc:creator>
      <dc:date>2024-03-25T07:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do I send email using VIYA REST api?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/923164#M2318</link>
      <description>&lt;P&gt;Any idea how to send with attachments, using this same method&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 12:57:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/923164#M2318</guid>
      <dc:creator>Sathyaseelan_C</dc:creator>
      <dc:date>2024-04-05T12:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I send email using VIYA REST api?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/923368#M2322</link>
      <description>&lt;P&gt;&lt;U&gt;&lt;A href="https://communities.sas.com/t5/SAS-Viya/Example-for-sending-email-using-REST-Api/m-p/888375#M1967" target="_blank"&gt;https://communities.sas.com/t5/SAS-Viya/Example-for-sending-email-using-REST-Api/m-p/888375#M1967&lt;/A&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;contains the answer to your question&lt;/U&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2024 06:47:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-do-I-send-email-using-VIYA-REST-api/m-p/923368#M2322</guid>
      <dc:creator>paterd2</dc:creator>
      <dc:date>2024-04-08T06:47:01Z</dc:date>
    </item>
  </channel>
</rss>

