DougHennig / SFMail

A library to send emails from VFP applications
15 stars 1 forks source link

Sending plaintext body as html removes line ending #4

Closed kobruleht closed 2 years ago

kobruleht commented 2 years ago

To reproduce, send plaintext message containing < and > characters like

Hello,

Is 

3<5 

or 

3>5 ?

SFMail sends this as html body. In Thunderbird line endings are ignored. Received message appears in single line:

Hello, Is 3<5 or 3>5 ?

Proposal:

UseHtml property should be set by caller. FoxPro class should contain this property.

Instead of

loMail.UseHtml = '<' $ .cBody and '>' $ .cBody

loMail.UseHtml = .cUseHtml

should used.

DougHennig commented 2 years ago

Added lUseHTML in the latest build. It defaults to .F. but is automatically set to .T. if you set cBody to a value containing both "<" and ">". You can set it back to .F. if desired before calling Send.