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,
    OAuthURL as String, OAuthClientID as String, 
    OAuthScope as String, OAuthClientSecret as String)

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.

OAuthURL

The URL to use for OAuth (Modern Authentication).

OAuthClientID

The ClientID to use for OAuth.

OAuthScope

The Scope to use for OAuth.

OAuthClientSecret

The ClientSecret to use for OAuth.

Return Value
None

See also

Application Object

© Stonefield Software Inc., 2023 • Updated: 05/26/22
Comment or report problem with topic