tsNet mail message not formatting
Sean Cole (Pi)
sean at pidigital.co.uk
Wed Mar 3 13:38:53 EST 2021
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 at 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 "xxxxxx at 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 at 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 at 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 at 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
More information about the use-livecode
mailing list