Function: E-Mail Message Send

by Simon Sparks · 1 April 2025

To use this function add it to the class library file named OrchestratorService.ts

GitHub Repository: https://github.com/SimonSparksUK/Orchestrator

Filename: OrchestratorService.ts

Functions: EmailMessageSend

Description: The following is the script to send an e-mail

public EmailMessageSend(strSubject:string, strToAddress:string, strContent:string): void {
 
  let objEmailMessage:EmailMessage = new EmailMessage();
  objEmailMessage.fromAddress = "orchestrator@cloudbuildtools.com";
  objEmailMessage.fromName = "Orchestrator";
  objEmailMessage.smtpHost = "smtp.cloudbuildtools.com";
  objEmailMessage.smtpPort = "25";
  objEmailMessage.subject = strSubject;
  objEmailMessage.toAddress = strToAddress;
  objEmailMessage.addMimePart(strContent, "text/html");
  objEmailMessage.sendMessage();
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like