Jump to content
  • How to to send an email via Outlook using IronPython in Spotfire®


    This script will send an email via Outlook. Outlook must be running in order for this script to work. This script will not work on Web Player. This is only for Professional Client.

    Introduction

    This script will send an email via Outlook. Outlook must be running in order for this script to work. This script will not work on Web Player. This is only for Professional Client.

    Code sample

    # Copyright © 2017. TIBCO Software Inc.  Licensed under TIBCO BSD-style license.
    
    import clr
    clr.AddReference("Microsoft.Office.Interop.Outlook")
    from System.Runtime.InteropServices import Marshal
    
    mail= Marshal.GetActiveObject("Outlook.Application").CreateItem(0)
    mail.Recipients.Add("email@gmail.com")
    mail.Subject = "Subject here"
    mail.Body = "Body here"
    mail.Send();

     


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...