watsonx.ai

 View Only
  • 1.  Watson Studio and IBM Cloud Email Delivery

    User Group Leader
    Posted Tue November 07, 2023 07:18 AM

    I need to create a notebook and connect to IBM Cloud Email Delivery for sending emails.

    I activated the IBM Cloud Email Delivery service and generated the API Key, yet unable to write down the code to create the linkage and send out emails.

    Any hints on how to proceed ? 

    Thanks in advance


    #Watsonstudio

    ------------------------------
    Massimo Loaldi
    ------------------------------


  • 2.  RE: Watson Studio and IBM Cloud Email Delivery

    User Group Leader
    Posted Wed November 08, 2023 03:57 AM

    I found the answer! Actually yesterday I missed validating my email in SendGrid, hence no email was correctly sent.. 

    The code in python within Watson Studio notebook for sending is the following : 



    ------------------------------
    Massimo Loaldi
    ------------------------------



  • 3.  RE: Watson Studio and IBM Cloud Email Delivery

    Posted Fri November 10, 2023 11:57 AM

    Were you running this in WOK/IKC notebook on-premises???

    I tried your jode in a notebokk and am getting this error.  Did you not get this?:



    ------------------------------
    Mark Hickok
    ------------------------------



  • 4.  RE: Watson Studio and IBM Cloud Email Delivery

    User Group Leader
    Posted Mon November 13, 2023 03:21 AM

    Ciao Mark, I made it from IBM Cloud, activated Email Delivery service from there (https://cloud.ibm.com/catalog/infrastructure/email-delivery), and validated my email in Sendgrid. 

    Moreover, you need to change a couple of things in the code you pasted:

    1. define reporthtml, in fact it is meant to be a html text, try with the following at the beginning :     reporthtml = "Hello, <br>This is a test email"
    2. <<<sendgrid API KEY >>>> is meant to be the APIKEY you need to generate in Sendgrid: go to Sendgrid site, from the menu select "Settings", then "API Keys", and then click on the button "Create API Key"  


    ------------------------------
    Massimo Loaldi
    Advisory Partner Technical Specialist - Automation
    IBM
    Segrate (MI)
    ------------------------------



  • 5.  RE: Watson Studio and IBM Cloud Email Delivery

    Posted Tue December 05, 2023 10:37 PM

    Thanks Massimo.  Sorry for the delayed response...

    I was trying this on CPD Software...  I just took the time to reproduce on SaaS and after some re-working I was able to send an email...  I'll take this back now and try it our on Software.



    ------------------------------
    Mark Hickok
    ------------------------------