Skip to main content
Version: 20 R8

Transporter Class

Description

.acceptUnsecureConnection

History
ReleaseChanges
17 R4Added

.acceptUnsecureConnection : Boolean

Description

The .acceptUnsecureConnection property contains True if 4D is allowed to establish an unencrypted connection when encrypted connection is not possible.

It contains False if unencrypted connections are unallowed, in which case an error in returned when encrypted connection is not possible.

Available secured ports are:

  • SMTP

    • 465: SMTPS
    • 587 or 25: SMTP with STARTTLS upgrade if supported by the server.
  • IMAP

    • 143: IMAP non-encrypted port
    • 993: IMAP with STARTTLS upgrade if supported by the server
  • POP3

    • 110: POP3 non-encrypted port
    • 995: POP3 with STARTTLS upgrade if supported by the server.

.authenticationMode

History
ReleaseChanges
17 R4Added

.authenticationMode : Text

Description

The .authenticationMode property contains the authentication mode used to open the session on the mail server.

By default, the most secured mode supported by the server is used.

Possible values are:

ValueConstantsComment
CRAM-MD5IMAP authentication CRAM MD5Authentication using CRAM-MD5 protocol
LOGINIMAP authentication loginAuthentication using LOGIN protocol
OAUTH2IMAP authentication OAUTH2Authentication using OAuth2 protocol
PLAINIMAP authentication plainAuthentication using PLAIN protocol

.authenticationMode

History
ReleaseChanges
17 R4Added

.authenticationMode : Text

Description

The .authenticationMode property contains the authentication mode used to open the session on the mail server.

By default, the most secured mode supported by the server is used.

Possible values are:

ValueConstantsComment
APOPPOP3 authentication APOPAuthentication using APOP protocol (POP3 only)
CRAM-MD5POP3 authentication CRAM MD5Authentication using CRAM-MD5 protocol
LOGINPOP3 authentication loginAuthentication using LOGIN protocol
OAUTH2POP3 authentication OAUTH2Authentication using OAuth2 protocol
PLAINPOP3 authentication plainAuthentication using PLAIN protocol

.authenticationMode

History
ReleaseChanges
17 R4Added

.authenticationMode : Text

Description

The .authenticationMode property contains the authentication mode used to open the session on the mail server.

By default, the most secured mode supported by the server is used.

Possible values are:

ValueConstantsComment
CRAM-MD5SMTP authentication CRAM MD5Authentication using CRAM-MD5 protocol
LOGINSMTP authentication loginAuthentication using LOGIN protocol
OAUTH2SMTP authentication OAUTH2Authentication using OAuth2 protocol
PLAINSMTP authentication plainAuthentication using PLAIN protocol

.bodyCharset

History
ReleaseChanges
18Support for UTF8 base64
17 R5Added

.bodyCharset : Text

Description

The .bodyCharset property contains the charset and encoding used for the body part of the email.

Possible values:

ConstantValueComment
mail mode ISO2022JPUS-ASCII_ISO-2022-JP_UTF8_QP
  • headerCharset: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
  • bodyCharset: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
mail mode ISO88591ISO-8859-1
  • headerCharset: ISO-8859-1 & Quoted-printable
  • bodyCharset: ISO-8859-1 & 8-bit
mail mode UTF8US-ASCII_UTF8_QPheaderCharset & bodyCharset: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (default value)
mail mode UTF8 in base64US-ASCII_UTF8_B64headerCharset & bodyCharset: US-ASCII if possible, otherwise UTF-8 & base64

.connectionTimeOut

History
ReleaseChanges
17 R5Added

.connectionTimeOut : Integer

Description

The .connectionTimeOut property contains the maximum wait time (in seconds) allowed to establish a connection to the server. By default, if the property has not been set in the server object (used to create the transporter object with SMTP New transporter, POP3 New transporter, or IMAP New transporter), the value is 30.


.headerCharset

History
ReleaseChanges
17 R5Added

.headerCharset : Text

Description

The .headerCharset property contains the charset and encoding used for the email header. The header includes the following parts of the email:

  • subject,
  • attachment filename(s),
  • email name.

Possible values:

ConstantValueComment
mail mode ISO2022JPUS-ASCII_ISO-2022-JP_UTF8_QP
  • headerCharset: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
  • bodyCharset: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
mail mode ISO88591ISO-8859-1
  • headerCharset: ISO-8859-1 & Quoted-printable
  • bodyCharset: ISO-8859-1 & 8-bit
mail mode UTF8US-ASCII_UTF8_QPheaderCharset & bodyCharset: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (default value)
mail mode UTF8 in base64US-ASCII_UTF8_B64headerCharset & bodyCharset: US-ASCII if possible, otherwise UTF-8 & base64

.host

History
ReleaseChanges
17 R5Added

.host : Text

Description

The .host property contains the name or the IP address of the host server. Used for mail transactions (SMTP, POP3, IMAP).


.logFile

History
ReleaseChanges
17 R5Added

.logFile : Text

Description

The .logFile property contains the path of the extended log file defined (if any) for the mail connection. It can be relative (to the current Logs folder) or absolute.

Unlike regular log files (enabled via the SET DATABASE PARAMETER command), extended log files store MIME contents of all sent mails and do not have any size limit. For more information about extended log files, refer to:


.port

History
ReleaseChanges
17 R4Added

.port : Integer

Description

The .port property contains the port number used for mail transactions. By default, if the port property has not been set in the server object (used to create the transporter object with SMTP New transporter, POP3 New transporter, IMAP New transporter), the port used is:

  • SMTP - 587
  • POP3 - 995
  • IMAP - 993

.sendTimeOut

History
ReleaseChanges
17 R4Added

.sendTimeOut : Integer

Description

The .sendTimeOut property contains the maximum wait time (in seconds) of a call to .send( ) before a timeout occurs. By default, if the .sendTimeOut property has not been set in the server object, the value 100 is used.


.user

History
ReleaseChanges
17 R4Added

.user : Text

Description

The .user property contains the user name used for authentication on the mail server.


.checkConnection()

History
ReleaseChanges
17 R4Added

.checkConnection() : Object

ParameterTypeDescription
ResultObject<-Status of the transporter object connection

Description

The .checkConnection() function checks the connection using information stored in the transporter object, recreates the connection if necessary, and returns the status. This function allows you to verify that the values provided by the user are valid and consistent.

Returned object

The function sends a request to the mail server and returns an object describing the mail status. This object can contain the following properties:

PropertyTypeDescription
successbooleanTrue if the check is successful, False otherwise
statusnumber(SMTP only) Status code returned by the mail server (0 in case of an issue unrelated to the mail processing)
statusTexttextStatus message returned by the mail server, or last error returned in the 4D error stack
errorscollection4D error stack (not returned if a mail server response is received)
[ ].errCodenumber4D error code
[ ].messagetextDescription of the 4D error
[ ].componentSignaturetextSignature of the internal component which returned the error