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
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();
License: TIBCO BSD-Style License
Feedback (5)
you can add this for attachements
mail.Attachments.Add("C:/temp/viz.png")
Any chance of a version for the webplayer?
Anyone have a way to attach a file or embed an image with this?
This is great, but are there any solutions that work in webplayer?
This is amazing.