ns=2;s=DEPRAG Smart/Network/EMailClient/SmtpServerSettings/UserName
The user name with which the application authenticates itself to the SMTP server.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bReadUserName : BOOL;
bWriteUserName : BOOL;
hrUserName : HRESULT;
UserName : STRING(80);
fbSmtpServerSettings : FB_SmtpServerSettings;
END_VAR
hrUserName := fbSmtpServerSettings.ReadUserName(
bExecute := bReadUserName,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
Output => UserName);
IF hrUserName <> S_FALSE THEN
bReadUserName := FALSE;
END_IF
hrUserName := fbSmtpServerSettings.WriteUserName(
bExecute := bWriteUserName,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
PointerToNodeValue := ADR(UserName),
SizeOfNodeValue := SIZEOF(UserName));
IF hrUserName <> S_FALSE THEN
bWriteUserName := 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".