Emailing using JANOS.sendmail()

Written by Anthony Pavia on Oct 20, 2022 2:02 pm

After configuring the JNIOR properly, a way to send an email from it is to use the JANOS.sendmail() function. The .sendmail() function needs the name of a mail profile on the JNIOR that you defined earlier, the subject of the email, and the email’s message.

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) {
        
        JANOS.sendMail("YOUR EMAIL-PROFILE HERE", "EmailExample", "This was built and sent from the JANOS 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 JANOS.sendmail() example.

On this page
Tags