LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

E-mail servers rejects mail with line feed characters

Solved!
Go to solution

Hi. 

When I send mail with line feed characters, I find that some mail servers reject the mail.
If I remove line breaks, it works fine.

 

Message: Your message contains invalid characters (bare line feed characters) which the email servers at getmail.no don't support.

 

I have tried replacing line feed with carriage return constant. It works against mail servers that accept line feed, but recipients with mail servers that do not accept line feed receive mail without line breaks.

 

I use LV 2015. Windows 7.

Can anyone help?

LV line feed.png

 

Greetings Stein

0 Kudos
Message 1 of 6
(12,373 Views)
Solution
Accepted by topic author steinhl

Have you checked to see if the email server will accept the line feeds with an escape character preceding it?

e.g. \ or \\ before the line feed.

it may just be the way that the server is processing the string.

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 2 of 6
(12,348 Views)

Maybe they are Windows based and insist on Windows line end, which in fact is a carriage return followed by a line feed. For a mail server I would absolutely consider this a bug, but tell that the big guys.

 

Typically different OSes use different line forward characters,

 

Unix uses line feed

MacOS uses carriage return

Windows uses carriage return and line feed

 

When receiving, smart applications should be prepared to accept all of these, while sending out what the underlying OS prefers, unless you state otherwise in the documentation. But a mail sever barking on carriage return or line feed only contents should be considered garbage.

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 6
(12,340 Views)

Hi

Great. Now it works. My text included "all" cind of line feed. By cleaning up the text strings (code in the image) it's no longer a problem.

Thank's a lot.sp170710_125318.png

Best Regards Stein

0 Kudos
Message 4 of 6
(12,284 Views)

You seem to have marked my post number 2 as the solution, but from looking at your fix I would suggest that Rolfk's post 3 is at least as useful and possibly more worthy of being marked as the solution - I think you could mark them both if you wanted to mark up to 2 posts.

 

James

 

(It erks me to take credit away from an uber guru like Rolf Smiley Sad)

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 5 of 6
(12,272 Views)

ERROR: 554.5.6.0 Invalid Message Content, contains bare linefeeds

Well, all there is a PDF attachment no Text or HTML.  I simplified the Code to have no Text to even enter a bare linefeed.

See image.

 

Anyone having problems sending attachments and getting the Bare Linefeed error?  This is happening with Exchange Online (O365).

0 Kudos
Message 6 of 6
(11,876 Views)