If you want to be the most accurate (clear for others reading code) you would 
use the LF constant instead of CR since that is how it actually evaluates.  The 
only way to generate an actual CR within code is to use CRLF (which gets both) 
or use numtobyte(13).

If you export as text, then you get what is expected on Win/Linux and get CR on 
Mac (which is wrong in my opinion).

Sent from my iPhone

> On Mar 3, 2021, at 12:40 PM, Sean Cole (Pi) via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> You have to do this:
> 
> replace cr with crlf in tBody
> 
> Personal Btw: I find that using ‘return’ results in ugly code as a personal
> preference, so I avoid that and use cr. it’s just that the script renderer
> shows ‘return’ in yellow for it’s command equivalent because they still
> haven’t coded the editor to work out if you are using it as the command or
> the keyword.
> 
> All the best.
> 
>> On Wed, 3 Mar 2021 at 17:41, matthias rebbe via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> 
>> Tried this script here on macOS
>> 
>> put "this is line 1"&return &"this is line 2" into tBody
>> 
>> put "xxxxxx" into tFrom
>> 
>> put "xxx...@me.com" into tTo
>> 
>> put "Email test" into tSubject
>> 
>> put "xxxx" into tSettings["username"]
>> 
>> put "xxxx" into tSettings["password"]
>> 
>> put TRUE into tSettings["NO_REUSE"]
>> 
>> put "smtp://xxx.xxx.Xxx.xxx" into tServer
>> 
>> mimeEncodeAsMIMEEmail tBody,tFrom,tTo,"",tSubject
>> 
>> put it into tData
>> 
>> put tsNetSmtpSync(tServer, tFrom, tTo, tData, rOutHeaders, rBytes,
>> tSettings)
>> 
>> 
>> The email body is showing 2 lines in Apple Mail as expected.
>> 
>> Could you show your code, at least the coder which you are using to
>> fill/create the message (smtp header and body)?
>> 
>> 
>> 
>> -
>> Matthias Rebbe
>> Life Is Too Short For Boring Code
>> 
>>> Am 03.03.2021 um 18:09 schrieb Rick Harrison via use-livecode <
>> use-livecode@lists.runrev.com>:
>>> 
>>> I want to send a message that has multiple lines.
>>> I have tried inserting cr and return and nothing
>>> works so far. The message ends up on a same line.
>>> 
>>> Ideas?
>>> 
>>> Thanks,
>>> 
>>> Rick
>>> 
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> -- 
> Pi Digital
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to