Share via


SysMailerNet.smtpRelayServer Method [AX 2012]

Specify the SMTP relay server settings that will be used to send mails from AX using the SysMailerNet API

Syntax

public void smtpRelayServer(
    str _server, 
   [int _port, 
    str _userName, 
    str _password, 
    boolean _useNTLM])

Run On

Called

Parameters

  • _server
    Type: str
    SMTP server name
  • _port
    Type: int
    Port on which SMTP is enabled. The default value is set to port 25.
  • _userName
    Type: str
    Specify user name authenticated for sending mails
  • _password
    Type: str
    Specify user password.
  • _useNTLM
    Type: boolean
    Set this flag to true, if NTLM authentication can be used to authenticate sender of the mail to SMTP server

Remarks

When using the SysMailerNet, this method must be called before the sendMail API is invoked.

When _useNTLM flag is set, the _userName and _password are reset. i.e., these fields must be specified if the _useNTLM is not set to true.

See Also

Reference

SysMailerNet Class