04-05-2016 08:17 AM
Hello!
I tried to send e-mail, using "Send Email using SMTP Client.vi" (labview example).
The timestamp of the mails were 01.01.1970 every time.
How can I send e-mail with correct timestamp?
LV version: 2014 SP1
Operating system: Windows 7
Thank you!
Solved! Go to Solution.
04-05-2016 09:15 AM - edited 04-05-2016 09:17 AM
Looking at the core of the SMTP VIs found in <vi.lib>\smtpClient I don't see any input for any timestamp control on the Set Message Text or Send functions. I'm not sure where that time is coming from. These VIs are locked, and are probably just DLL calls anyway so unless there is just a timestamp constant on the block diagram of them I don't think you can fix this without NI updating these functions. This is a pretty simple need, but could you post some code, showing what functions you are using?
EDIT: Oh never mind about posting code I see it was an example.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-05-2016 09:21 AM
Yeah it looks like you are out of luck as far as these functions go. They all call the following DLL
<LabVIEW Install>\resource\niSmtpClient.dll
and the interface to that DLL isn't documented, and it doesn't look like an obvious unused input. Unless I see otherwise I say this is a bug that NI needs to fix.
As for workarounds you might get away with trying to send emails using a 3rd party like Gmail. There are a few examples on the forums on how to use a Gmail account to send emails and I assume that will have a proper time stamp.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-05-2016 12:39 PM
Isn't 01-01-1970 Unix Epoch?
04-06-2016 09:46 AM
Hello!
I found another way.
The idea is came from a Gmail example.
It works well with our SMTP server. The time is correct!
Thank you all!
04-06-2016 10:24 AM
@ePeti wrote:Hello!
I found another way.
The idea is came from a Gmail example.
It works well with our SMTP server. The time is correct!
Thank you all!
Well... you solved it, so give yourself credit! Mark your post as the solution so other people will know there may be a solution if they have a similar issue, too. 🙂