Cannot send email using IIoT Libraries SL

jjknuutt
2022-08-30
2022-09-23
  • jjknuutt - 2022-08-30

    Hi!

    I am trying to send email using IIoT Libraries SL (1.6.0.0) that includes Mail Service SL (1.1.3.0). These are the latest versions currently. I have CODESYS V3.5 SP16 Patch 5 + (64-bit) and IFM CR1077 as hardware. The IFM device actually includes a license for the IOT libraries, but even without that, there is a 30-minute demo function in the library.

    I have tried using the sample project with sample Visu on the device to send email, but it fails with a TIME_OUT (5001).

    EDIT: Using the "CODESYS V3 Soft-PLC for Windows with non realtime capabilities (CODESYS Control Win V3 x64)" as the device, it works.

    I have tried sending email to different SMTP servers, which I have confirmed to work using Thunderbird. For example, mailtrap.io seems to be perfect for this sort of testing. STARTTLS used, but no TLS nor SSL required. The library and the Mail Service example project have an option to use STARTTLS so that should be fine. And anyway, the library does not complain about logins, encryption or anything, but seems to fail at an earlier stage.

    Also, I have logged in to the IFM device using SSH and confirmed I can ping the SMTP server using it's IP. DNS does not seem to be configured properly (cannot find the settings), but should not matter if I use the IPV4 address directly.

    Any ideas about what would be the problem?

    Thanks for any help!
    Jere

     

    Last edit: jjknuutt 2022-08-30
  • rdcoulton - 2022-09-23

    Hi Jere,

    We have also been having similar issues with the IOT library's on IFM PLC's.

    I have traced the issue as you have to be to do with DNS resolution.

    For a work around we have to set the PLC to get it's IP address via DHCP which also sets the DNS server address on the PLC. As far as we have been able to find, there is no way to set the DNS server address for the ethernet stack on these when using them with a manually set / static IP Address.

    I previously discussed the issue with IFM support over a year ago and have not seen a resolution to this other than using DHCP.

    Hopefully this helps (if you haven't already found a solution). If you do, or anyone else knows an alterative way of manually setting the DNS server in Codesys then this would be greatly appreciated as running on DHCP isn't ideal for us.

    Thanks.

    Richard

     

Log in to post a comment.