Loupe - Log - Monitor - Resolve
Gibraltar.Agent Namespace / PackagerDialog Class / SetEmailServer Method
The full DNS name of the SMTP server to use to relay the mail message.
Optional. The TCP/IP Port number to connect to the server on. Use 0 for the default configured port.
True to encrypt the server communication with Secure Sockets Layer.
Optional. A user name to use instead of the current windows user credentials to communicate with the email server.
Optional. A password to use for the user name for credentials to communicate with the email server.

In This Topic
    SetEmailServer Method
    In This Topic
    Specify email server information to use if required instead of the information stored in the application configuration.
    Syntax
    'Declaration
     
    
    Public Sub SetEmailServer( _
       ByVal emailServer As String, _
       ByVal serverPort As Integer, _
       ByVal useSsl As Boolean, _
       ByVal emailServerUser As String, _
       ByVal emailServerPassword As String _
    ) 

    Parameters

    emailServer
    The full DNS name of the SMTP server to use to relay the mail message.
    serverPort
    Optional. The TCP/IP Port number to connect to the server on. Use 0 for the default configured port.
    useSsl
    True to encrypt the server communication with Secure Sockets Layer.
    emailServerUser
    Optional. A user name to use instead of the current windows user credentials to communicate with the email server.
    emailServerPassword
    Optional. A password to use for the user name for credentials to communicate with the email server.
    Remarks

    Use this option if you want to have the packager user a specific email server instead of the email server in the current agent configuration. This is particularly useful if you need to authenticate to your mail relay and do not want to have the credentials in your configuration file.

    The order that configuration data is used is:

    • A server provided to this method will override all other configuration options.
    • If no server is provided to this method, the running configuration will be used. The running configuration can be set dynamically by subscribing to the Initializing Event (Gibraltar.Agent.Log) event.
    • If no server was provided to the Initializing event the email section in the application configuration file is used.
    • If no server information was specified in the gibraltar email section of the application configuration file then the general .NET email server configuration is used.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also