Setting up SMTP email for Outlook 365
Prerequisite: You must have an Office 365 app password as documented at https://docs.microsoft.com/en-us/azure/active-directory/user-help/multi-factor-authentication-end-user-app-passwords.
You can send email through your Office 365 server after you complete the follow steps to configure eFORMz:
- Back up eFORMz.ini.
- Open eFORMz.ini in a text editor such as Notepad++. The file should contain text similar to this. Your javaw.exe path, -mx, and -ms values might be different, but the jar files must match the jar files in your jar directory:
.\bin\javaw.exe -mx1024M -ms128M --Xbootclasspath/a:jars/javax.mail-1.5.5.jar:jars/jai-imageio-core-1.3.1.jar:jars/activation.jar
- Add the following line after the existing text in the file:
-Dmail.smtp.starttls.enable=true -Dmail.smtp.ssl.trust=smtp.office365.com
Note: If encountering errors such as “Could not convert socket to TLS”, “PKIX path building failed” or “unable to find valid certification path to requested”, make sure the following is in the file:-Dmail.smtp.ssl.trust=smtp.office365.com
Note 2: The “-D” definitions must be present before the “-jar” line. The sequence “-jar Run.jar” splits the processing of the command line. Those present before are part of the Java Runtime. The parameters after are past on to the application (Run.jar):params = 10 param00 = -mx4G param01 = -ms512M param02 = -Xbootclasspath/a:jars/javax.mail-1.5.5.jar;jars/jai_imageio-1.1-alpha.jar param03 = -Djava.awt.headless=true param04 = -Dmail.smtp.starttls.enable=true param05 = -Dmail.smtp.ssl.trust=smtp.office365.com param06 = -jar param07 = Run.jar param08 = -Monitor=true param09 = -
- Another location to add “-Dmail.smtp.starttls.enable=true” is all of the jsl_*.ini files.
- Now you can enter your Office 365 server in a JavaMail step in eDirect. The SMTP host is smtp.office365.com with a port of 25:
- Finally, click the SMTP Options tab and enter your authentication credentials. Do not use the author’s credentials.
- Save the project and you are finished.
NOTE: Sending emails through smtp.office365.com has a limit of 10,000 recipients per day and a Message rate of 30 messages per minute. For single threaded emails, this is not a common issue. For multi-threaded emails, it can become one. For more information, consult the following post:
https://docs.microsoft.com/en-us/office365/servicedescriptions/exchange-online-service-description/exchange-online-limits#receiving-and-sending-limits