As a transitional step, this site will temporarily be made Read-Only from July 8th until the new community launch. During this time, you can still search and read articles and discussions.

While the community is read-only, if you have questions or issues requiring TIBCO review/response, please access the new TIBCO Community and select "Ask A Question."

You will need to register or log in or register to engage in the new community.

How to to send an email via Outlook using IronPython in TIBCO Spotfire®

Last updated:
11:47pm Aug 26, 2019
Back to main IronPython scripting page


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
from System.Runtime.InteropServices import Marshal

mail= Marshal.GetActiveObject("Outlook.Application").CreateItem(0)
mail.Subject = "Subject here"
mail.Body = "Body here"


License:  TIBCO BSD-Style License

Feedback (5)

you can add this for attachements


navjeet_singh 2:49pm Aug. 07, 2019

Any chance of a version for the webplayer?

oliver.drummond 5:16pm Aug. 07, 2019

Anyone have a way to attach a file or embed an image with this?

Dan.Westphal 12:21pm Mar. 13, 2019

This is great, but are there any solutions that work in webplayer?

sarah.richards 8:22am Jan. 15, 2018

This is amazing. 

Rahul Kale 12:32pm Apr. 06, 2017