We’ve had many customers ask us, “how can I send an email message out of the mainframe, from a script or web service, to notify someone?” It has been possible for some time. A new IBM service, which HostBridge exploits through a JavaScript object, has made it easier to send mainframe email messages.

In z/OS 2.2, IBM introduced a new service as part of the communication server called CSSMTP.  The new, “official” way of sending email out of the host is through CSSMTP. If your systems programmers have set up CSSMTP in your z/OS environment, you have the ability to send mainframe email through this service.

If your environment has been set up with CSSMTP, you can now easily send information – email messages – directly out of a CICS web service created with the HostBridge JavaScript Engine (HB.js).  The email messages can go to any set of email addresses. They can also contain as much data as desired in a single message.

HostBridge JavaScript Object: MailMessage

To simplify sending mainframe email out of CICS web services, HostBridge has developed a JavaScript object called MailMessage that will let HB.js users send email out of the host. Using this object, you an originate these email messages out of a running script or web service.

Sending email from an IBM mainframe CICS application

Sending email out of CICS applications through CSSMTP and the HostBridge JavaScript object, MailMessage.

Prior to the availability of the CSSMTP, sending mainframe email was possible. However, it was a complicated, convoluted and unreliable process. Now that IBM has provided a supported API to send email, HostBridge provides a convenient interface to this service. HostBridge customers can invoke this JavaScript object from any of their HB.js scripts or web services.

Learn More or Get MailMessage

This new HostBridge email JavaScript Object is free and available to HostBridge customers. The next release of HostBridge will include the MailMessage object as one of the common utilities, but the object is available now for anyone who wants it.  Learn more by reading “Sending E-Mail from a Service” on the HostBridge support Wiki.