The SaveEmailSettings method saves the email settings for the current user. This can be used in a script, for example, to automate setting email settings rather than have the users do it themselves using the Options dialog.

Syntax

SaveEmailSettings(ContactName as String,
    Email as String, MailServer as String,
    UseMAPI as Boolean, SMTPPort as Integer,
    SecurityOptions as Integer, UserName as String,
    Password as String, Timeout as Integer,
    UseMailKit as Boolean, Logging as Boolean)

Parameters
ContactName
The contact name of the user.

Email
The user's email address.

MailServer
The name of the mail server.

UseMAPI
True to use MAPI, false to use SMTP.

SMTPPort
The port to use.

SecurityOptions
The SSL/TLS setting to use: 0 = None, 1 = Auto, 2 = Use SSL/TLS on connect, 4 = Use TLS if available

This parameter used to be Boolean: True to use SSL, False to not use encryption. You can still pass a Boolean value for this parameter, but with either True or False, Auto is used.

UserName
The user name to connect to the mail server.

Password
The password to connect to the mail server.

Timeout
The timeout value in seconds.

UseMailKit
True to use the new MailKit email component, false to use the older component.

Logging
True to perform email logging.

Return Value
None

See also

Application Object

© Stonefield Software Inc., 1996-2020 • Updated: 10/20/20
Comment or report problem with topic