There are two aspects of email security that often must be addressed when UnForm communicates with a mail server.


Encryption


Most mail servers support two forms of encryption: SMTPS (SMTP over  SSL) and STARTTLS (sometimes just called TLS).  To support SMTPS, you define the server specification in UnForm (usually in prog/mailcall.ini) as server=ssl:servername:port, the default port being 465.  For example, if you use gmail for your email server, you can use server=ssl:smtp.gmail.com:465  (or just ssl:smtp.gmail.com since 465 is the default port when you use the ssl: prefix).  This type of connection has been supported since UnForm 7.1.  Note that the Office365 mail servers do not support SMTPS.


STARTTLS is a different technique, where UnForm initially connects over a non-secure connection, then upgrades the connection to a secure one after the connection is initiated.  This attempt to upgrade the connection is automatic if the server advertises that it wants STARTTLS during its initial handshake.   This is typically served on port 25 or 587, so just be sure to specify which one the mail server requires.  Since there is no ssl: prefix in this case, you will need to specify the port value if it is not 25.  A setting server=myserver:587 would be utilized for the port 587.  UnForm 9.0 is the first release that  supports this type of encryption.


Of note is that if a server advertises STARTTLS, but for some reason you do not want UnForm to attempt to upgrade the connection, you can specify a notls: prefix to the server line, such as server=notls:myserver.com.  As STARTTLS support was added in 9.0, the notls: prefix is also only available in 9.0.


Ports can be specified in two ways: either as a :port suffix to the server= setting, or as a port=number in the prog/mailca..ini file.  If you specify the suffix style, that takes precedence.


Authentication


UnForm also supports authentication, which is unrelated to the encryption used by the connection, but often used in conjunction with encryption.  Simply put, authentication means the server will require UnForm to login before it will pass mail on to other servers on the internet.  Generally all you need to do is ensure the emailing method specifies a login and password.  A default login and password can be defined in prog/mailcall.ini.  Note that this login does not need to be the same as the From address for the email, though some mail servers will change the From address to the login address.