LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SMTP Email Palette - Subject text format

Solved!
Go to solution

Using the SMTP Email palette, if I include a colon in the string wired to the Subject input of 'Set Message Text Html.vi', it shows up as a question mark in the email Subject in the recipient's inbox.

 

For example, sending "Test Completed at 10:00AM" as the email subject turns into "Test Completed at 10?00AM" on the receiving end.

 

How do I properly format the Subject string to get a colon on the receiving end?

0 Kudos
Message 1 of 11
(5,611 Views)

I get it too. I think the problem lies in the Set Message Text.vi within the SMTP pallete. I can't get to the block diagram because it is password protected but it appears to come in correctly on the front panel.

 

Edit: Nope, I get it on the SMTP Express VI too.

0 Kudos
Message 2 of 11
(5,585 Views)

What version of LabVIEW are you using?  What operating system?  Do you have additional languages set, besides English, on your computer?

 

Thanks,

Jonathan R.
Applications Engineer
National Instruments
0 Kudos
Message 3 of 11
(5,516 Views)

I've got 2014 SP1 32-bit on a WIn 7 64-bit and using MS Outlook 2010. Only English is set on my PC.

0 Kudos
Message 4 of 11
(5,503 Views)

I am running:

LabVIEW 2015 32-bit (v15.0.0)

Windows 7 Pro 64-bit

 

As far as I know, English is the only language I have installed.

0 Kudos
Message 5 of 11
(5,474 Views)

I believe the colon is reserved in smtp as a field delimiter character.

 

You might be able to make the colon literal by placing a backslash immediately before it.

 

Something like "Test Completed at 10\:00AM"


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 6 of 11
(5,460 Views)

Phillip,

 

I tried your suggestion and I get the same behavior as before but with the back slash. I've tried this with other programming languages (without the back slash) and I get the colon as expected.

 

I don't want to take away from MStewart's post but I'd figure I'd weigh in...

 

Eric

0 Kudos
Message 7 of 11
(5,419 Views)

No worries Eric, glad to know I am not the only one having this issue.

 

I am getting the same result when I use the backslash.

 

"Test Complete at 10\:00" turns into "Test Complete at 10\?00"

0 Kudos
Message 8 of 11
(5,405 Views)
Solution
Accepted by topic author MStewart

The : (colon) is definitely a reserved SMTP field character.

 

You can customize the Subject content by encoding it as 8-bit and then use the hex value for colon (3A) to encode the colon. Try the exact subject text below; it worked for me using gmail.

 

=?iso-8859-1?Q?Test completed at 10=3A00 AM?=

https://en.wikipedia.org/wiki/MIME#Difference_between_Q-encoding_and_quoted-printable

 

 


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

Message 9 of 11
(5,384 Views)

You frequently see colons in subject lines, but as a part of an RE: or FW: added to the subject.  So it's not like it isn't regularly used.  But is it reserved because it needs to treat the foward/reply prefix specially?

0 Kudos
Message 10 of 11
(5,355 Views)