Emailing with JNIOR using Mail Composer

Written on: October 20, 2022 2:02 pm

After configuring the JNIOR properly, a way to send an email from it is to use the MailComposer class. This function has the user define the email being sent by building different parts of the email (Email address being sent to, Attachments to add, anyone that needs CC’d, subject, message, etc). Once these are all defined, you can use the MailComposer’s send() function to submit the email.

package emailexample;

import com.integpg.system.JANOS;
import com.integpg.system.MailComposer;

public class EmailExample {

    public static MailComposer mail = new MailComposer();
    public static void main(String[] args) {
        mail.setToAddress("YOUR EMAIL HERE");
        mail.setSubject("MailComposer Test");
        mail.setMessage("This was built and sent using the MailComposer Class.");

I put the built jar file of this example application into the JNIOR’s flash folder and ran it from the Web UI’s console tab. After it has successfully run, I check my email and have received one from the MailComposer example.

By | Updated On May 3, 2023 2:58 pm | No Comments | Categories: , | Tags:


INTEG Process Group, inc. © 2023

Mon - Fri, 8am - 4pm EST
P: 724-933-9350
Always Available
Contact Form