ns=2;s=DEPRAG Smart/Network/EMailClient/SmtpServerSettings/MailServerAddress
Address 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
bReadMailServerAddress : BOOL;
bWriteMailServerAddress : BOOL;
hrMailServerAddress : HRESULT;
MailServerAddress : STRING(80);
fbSmtpServerSettings : FB_SmtpServerSettings;
END_VAR
hrMailServerAddress := fbSmtpServerSettings.ReadMailServerAddress(
bExecute := bReadMailServerAddress,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
Output => MailServerAddress);
IF hrMailServerAddress <> S_FALSE THEN
bReadMailServerAddress := FALSE;
END_IF
hrMailServerAddress := fbSmtpServerSettings.WriteMailServerAddress(
bExecute := bWriteMailServerAddress,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
PointerToNodeValue := ADR(MailServerAddress),
SizeOfNodeValue := SIZEOF(MailServerAddress));
IF hrMailServerAddress <> S_FALSE THEN
bWriteMailServerAddress := 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".