B4J Question SMTP Mail special characters truncated

imbault

Well-Known Member
Licensed User
Longtime User
Hello,

I have this code :

B4X:
cSqlCegid = $"SELECT * FROM [dbo].[Z_IAUDITOR] where DATE_AUDIT <= CONVERT( date, DATEADD(day, ${nDays}, GETDATE()))
    and DATE_AUDIT >= CONVERT( date, GETDATE())
"$

Dim cMsg as String

cMSg =  $"
Date run   : ${DateTime.Date(DateTime.Now)}
Sql Query  :
    ${cSqlCegid}
"$

smtp.Initialize(SMTP_server, SMPT_Port, SMTP_Username, SMTP_Password, "SMTP_Audits")
smtp.HtmlBody = False
smtp.Body = cMSg
...
smtp.send

The resulting message is :

Date run : 06/10/2022
Sql Query :
SELECT * FROM [dbo].[Z_IAUDITOR] where DATE_AUDIT <=NVERT( date, DATEADD(day, 4, GETDATE()))
and DATE_AUDIT >=NVERT( date, GETDATE())
 

MarcoRome

Expert
Licensed User
Longtime User
Look

B4X:
$"SELECT * FROM [dbo].[Z_IAUDITOR] where DATE_AUDIT <=3D CONVERT( date, DATEADD(day, ${nDays}, GETDATE())) and DATE_AUDIT >=3D CONVERT( date, GETDATE())"$
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
 
Upvote 0
Top