LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

email timestamp

Solved!
Go to solution

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!

0 Kudos
Message 1 of 6
(3,407 Views)

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.

0 Kudos
Message 2 of 6
(3,380 Views)

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.

0 Kudos
Message 3 of 6
(3,375 Views)

Isn't 01-01-1970 Unix Epoch?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 6
(3,344 Views)
Solution
Accepted by topic author ePeti

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!

0 Kudos
Message 5 of 6
(3,302 Views)

@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.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 6
(3,294 Views)