ns=2;s=DEPRAG Smart/Network/EMailClient/SmtpServerSettings/MailServerPort
Port of the SMTP server.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bReadMailServerPort : BOOL;
bWriteMailServerPort : BOOL;
hrMailServerPort : HRESULT;
MailServerPort : DINT;
fbSmtpServerSettings : FB_SmtpServerSettings;
END_VAR
hrMailServerPort := fbSmtpServerSettings.ReadMailServerPort(
bExecute := bReadMailServerPort,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
Output => MailServerPort);
IF hrMailServerPort <> S_FALSE THEN
bReadMailServerPort := FALSE;
END_IF
hrMailServerPort := fbSmtpServerSettings.WriteMailServerPort(
bExecute := bWriteMailServerPort,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
PointerToNodeValue := ADR(MailServerPort),
SizeOfNodeValue := SIZEOF(MailServerPort));
IF hrMailServerPort <> S_FALSE THEN
bWriteMailServerPort := FALSE;
END_IF
For examples and explanations regarding the calls of nodes via Siemens TIA Portal please refer to the sub-menu "Siemens TIA Portal" in section "Getting Started".