01-26-2022 09:12 AM - edited 01-26-2022 09:30 AM
hello
i have a vi that send a email image smtp1
since the first days of this year i've been having able to send email
this is the error i received
"error nº 1172
Invoke Node Error calling method System.Net.Mail.SmtpClient.Send, (System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Inner Exception: System.Net.Mail.SmtpException: Failure sending mail.
Inner Exception: System.IO.IOException: Unable to read data from the transport connection: net_io_connectionclosed.) <append><b>System.IO.IOException</b> in email_smtp.vi"
i try another code smtp 2, i don't have any error but i don't received the email
i look in forums for the problem, and seems is related with TLS version
how could i resolve this in labview 2013
https://stackoverflow.com/questions/28362132/office-365-smtp-starts-firing-net-io-connectionclosed
01-26-2022 09:21 AM
If you are trying to fix "TTL", then you are "fixing the wrong problem". The problem is (as the Stack Overflow article explains) with the Transport Layer Security feature, which needs to be updated from Version 1.1 to 1.2. Search the Web for TLS 1.2 and you should find an explanation.
Bob Schor
01-26-2022 09:32 AM
@Bob thank very much
my problem is TLS and not TTL
i already correct the post, and i'm looking your solution
01-27-2022 03:30 AM - edited 01-27-2022 03:32 AM
The last entry in stack overflow about the .Net solution is quite clear.
Recently, we started rejecting a percentage of connections to smtp.office365.com that uses TLS1.0/1.1 for SMTP AUTH (complete disablement will start early 2022).
I can't help you with the .Net part. You have to make sure that the SmtpClient is configured properly to use TLS 1.2 explicitly. How that is done is always a difficult thing as that cryptography stuff seems to always be designed to make it hard to do anything. Currently you only configure the actual SmtpClient part that deals with your emails but you have to somehow tell him also what security transport layer provider to use.
As to the older LabVIEW versions SMTP client to force it to use TLS 1.2 I'm afraid that that is not going to work. LabVIEW 2013 uses internally a fairly old version of libcurl and OpenSSL that had TLS 1.0. and 1.1 not disabled and TLS 1.2 only as optional feature. There might be a possibility to change something by using an environment variable since OpenSSL can be influenced with environment variables but this is all so well hidden behind the neat VI library interface that it is really hard to figure that out without having direct access to the code behind it. And NI was always very tight lipped about these things, so it would seem that this is a dead end.
Newer LabVIEW versions use much newer versions of OpenSSL and that MIGHT also influence how the SMTP Client library operates but I can't say for sure.
02-09-2022 04:13 AM - edited 02-09-2022 04:13 AM
Problem solve
i create a VI that create a vbs file than i can execute
my email server is office365