Mail subject with non-standard characters

I was thinking about good example uses for the Base64 Encoding utility I posted last week, and then I remembered: e-mails!

Sending an e-mail from your application is a pretty common task. Let's say your client wants to be automatically informed when some conditions are met in the plant. So you do it, and probably use the Send Email using SMTP Cient.vi that comes with LabVIEW (since LV2013) and allows the use of secure mail servers, as Gmail.

So far, so good. But what happens when you put some non-English characters in the subject line? This is usual for us Spanish speakers, and the results are not as intended, but garbage text on the other side.

The answer is to use an encoded-word syntax. In this case we'll use Base64 and the VI I uploaded. The change needed in the mail client VI is minimum:

Just encode the text in Base64, encapsulate it as indicated, and your subject line will be readable in any mail client, as you can see in the lower image.

Comentarios

Entradas populares de este blog

SNMP library for LabVIEW

Base64 Encoding

Retrieve CPU temperature