Problem with new lines in email

can someone knowlegeable take a look at this app which i originally ported to hubitat.
i am getting the following error when trying to send the nightly log of device batteries to an att text..

so i went through the entire app and changed all \n to \r\n .. but still getting the error..

thanks

i tried looking in hex editor but dont see any naked new lines..
Body of message generated response:
552 5.2.0 Message contains bare LF and is violating 822.bis section 2.3

Original message follows.

Received: from [192.168.1.109] [96.58.137.232] by R900
(SMTPD-12.5.8.58) id 68000000018c0276; Thu, 18 Jan 2024 12:19:56 -0500
From: kahn-condo206@lgk1.com
To: 9064907476@mms.att.net
Date: Thu, 18 Jan 2024 12:20:01 -0500
Message-ID: 162c26349125494a990231b2f770a0ec.1705598401122@2LGKSendmailV3
Subject: Hubitat Condo 206 Notification
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

For Hub: Condo206

Batteries with medium charge (between 10 and 70)

50 Water Leak Sensor

Batteries with high charge (more than 70)

93 Condo 206 Wireless Tag
95 Wine 206 Upper Tag
94 Wine 206 Lower Tag
95 Leak Sensor Tag

Batteries with full charge

WF Upper/Clock
Kitchen Sink
Front Door Lock
Front Door
Slider
Hall Motion

https://raw.githubusercontent.com/lgkahn/hubitat/master/batterymonitor.groovey

You have double \n\n in a couple places without the \r

image

2 Likes

Thanks well spotted. that fixed it..

I just a ctrl-f search \n and looked at every one to make sure it had a \r before it, eventually found that cluster.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.