IsSslEnabled

Write Read TwinCAT TIA
Network E-Mail SmtpServerSettings

ns=2;s=DEPRAG Smart/Network/EMailClient/SmtpServerSettings/IsSslEnabled

Specifies whether the connection to the SMTP server should be encrypted using SSL protocol.

Examples:

In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:

Beckhoff parameter:

    bReadIsSslEnabled
    A boolean variable that can be used to trigger the execution of the ReadIsSslEnabled command.
    bWriteIsSslEnabled
    A boolean variable that can be used to trigger the execution of the WriteIsSslEnabled command.
    hrIsSslEnabled
    This can be used to monitor the execution of the command. Error codes have the type "HRESULT".
    IsSslEnabled
    A Boolean variable that specifies whether the connection to the SMTP server should be encrypted using the SSL protocol.
    fbSmtpServerSettings
    An instance of the "FB_SmtpServerSettings" function block supplied with the DEPRAG Smart library.
    PointerToNodeValue
    A variable of the type "POINTER TO BYTE" in which is stored whether SSL protocol should be used for encryption.
    SizeOfNodeValue
    A UINT variable that specifies the length of the variable that specifies whether to encrypt using the SSL protocol.
    ConnectionHandle
    "ConnectionHandle" received when establishing a connection between DEPRAG Smart Server and your OPC UA client.


VAR
    bReadIsSslEnabled       : BOOL;
    bWriteIsSslEnabled       : BOOL;
    hrIsSslEnabled        : HRESULT;
    IsSslEnabled        : BOOL;

    fbSmtpServerSettings      : FB_SmtpServerSettings;
END_VAR

hrIsSslEnabled := fbSmtpServerSettings.ReadIsSslEnabled(
      bExecute    := bReadIsSslEnabled,
      ConnectionHandle  := depragSmartConnection.ConnectionHandle,
      Output    => IsSslEnabled);
IF hrIsSslEnabled <> S_FALSE THEN 
    bReadIsSslEnabled := FALSE;
END_IF
  
hrIsSslEnabled := fbSmtpServerSettings.WriteIsSslEnabled(
      bExecute    := bWriteIsSslEnabled,
      ConnectionHandle  := depragSmartConnection.ConnectionHandle,
      PointerToNodeValue  := ADR(IsSslEnabled),
      SizeOfNodeValue  := SIZEOF(IsSslEnabled));
IF hrIsSslEnabled <> S_FALSE THEN 
    bWriteIsSslEnabled := 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".