Re: Email via IMAP with HTML body from a template
Thanks Charles I think that’s going to work. I’m going to do some testing and let you know how I get on. Sean > On 11 Aug 2022, at 07:23, Charles Warwick via use-livecode > wrote: > > Sorry, the last line of the replacement code should have been: > > put mimeEncodeAsMIMEMultipartDocument(tContent, “alernative”) into tBody > > (It was missing the "into tBody" at the end of the line) > >> On 11 Aug 2022, at 4:17 pm, Charles Warwick >> wrote: >> >> Hi Sean, >> >> After reading your second e-mail, I see that you don't want to use >> mimeEncodeFieldAsMIMEMultipartDocument to generate the HTML version of the >> e-mail body from a field as it does in that sample stack. >> >> If you want to create your own HTML and plain text versions of the e-mail >> body, you can still use that sample stack. Simply replace the following >> line: >> >> put mimeEncodeFieldAsMIMEMultipartDocument(the long id of field >> "email_message") into tBody >> >> With something like this: >> >> put “Content-Type: text/plain; charset=UTF-8” & crlf into tHeadersPlain >> put “Content-Transfer-Encoding: quoted-printable” after tHeadersPlain >> put “” into tBodyPlain >> put tHeadersPlain & crlf & crlf & \ >> mimeEncodeForMIMETransfer(tBodyPlain, “quoted-printable”) into tContent[1] >> >> put “Content-Type: text/html; charset=UTF-8” & crlf into tHeadersHTML >> put “Content-Transfer-Encoding: quoted-printable” after tHeadersHTML >> put “” into tBodyHTML >> put tHeadersHTML & crlf & crlf & \ >> mimeEncodeForMIMETransfer(tBodyHTML, “quoted-printable”) into tContent[2] >> >> put mimeEncodeAsMIMEMultipartDocument(tContent, “alernative”) >> >> Hope that helps, >> >> Regards, >> >> Charles >> On 11 Aug 2022, at 3:46 pm, Charles Warwick wrote: >>> Hi Sean, >>> There is a sample stack on my website for sending an e-mail with an >>> attachment using the MIME library here: >>> https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode >>> Does that help at all, >>> Regards, >>> Charles > On 11 Aug 2022, at 2:39 pm, Tom Glod via use-livecode > wrote: Sean, Try this .. edit the script of stack "com.livecode.library.mime" there seems to be some documentation there that may help. I also found this https://livecode.fandom.com/wiki/MimeEncodeAsMIMEMultipartDocument Is that your comment? :) Hope that helps a bit. > On Wed, Aug 10, 2022 at 11:46 PM Sean Cole via use-livecode < > use-livecode@lists.runrev.com> wrote: > Hi all, > I'm struggling with this still. It's been years (since before Dec 2020) > and > I just can't get my head around it. > I have a template created in Dreamweaver that is a simple bit of HTML body > with CSS styling embedded (https://pidigital.co.uk/DeepDiveReport.html). > There is also a pdf that needs to be attached. > How do I use MimeEncodeAsMIMEMultipartDocument to make it ready to send > via > tsNetSmtpSync? > There are zero tutorials and the dictionary is devoid of any useful > information on how to use it. Google turned up nothing. In my previous > request back in 2020, Monte, the author of the MIME library, had only > referred me on to the RSC docs for MIME which is like looking for a straw > in a needle stack. When I asked at one of the 'Firesides' I was told just > to use a template and send it. But to send it, it needs to be encoded and > that's the bit that is undocumented anywhere. > Any help appreciated. > ___ > 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 > > > ___ > 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
Re: Email via IMAP with HTML body from a template
I have to say, I've learned more about programming just from being a member of this list, than any book on the suject. Admittedly, I've read very few, as is manifestly evident when going back and re-reading my code. :-) Bob S > On Aug 10, 2022, at 23:23 , Charles Warwick via use-livecode > wrote: > > Sorry, the last line of the replacement code should have been: > > put mimeEncodeAsMIMEMultipartDocument(tContent, “alernative”) into tBody > > (It was missing the "into tBody" at the end of the line) > >> On 11 Aug 2022, at 4:17 pm, Charles Warwick >> wrote: >> >> Hi Sean, >> >> After reading your second e-mail, I see that you don't want to use >> mimeEncodeFieldAsMIMEMultipartDocument to generate the HTML version of the >> e-mail body from a field as it does in that sample stack. >> >> If you want to create your own HTML and plain text versions of the e-mail >> body, you can still use that sample stack. Simply replace the following >> line: >> >> put mimeEncodeFieldAsMIMEMultipartDocument(the long id of field >> "email_message") into tBody >> >> With something like this: >> >> put “Content-Type: text/plain; charset=UTF-8” & crlf into tHeadersPlain >> put “Content-Transfer-Encoding: quoted-printable” after tHeadersPlain >> put “” into tBodyPlain >> put tHeadersPlain & crlf & crlf & \ >> mimeEncodeForMIMETransfer(tBodyPlain, “quoted-printable”) into tContent[1] >> >> put “Content-Type: text/html; charset=UTF-8” & crlf into tHeadersHTML >> put “Content-Transfer-Encoding: quoted-printable” after tHeadersHTML >> put “” into tBodyHTML >> put tHeadersHTML & crlf & crlf & \ >> mimeEncodeForMIMETransfer(tBodyHTML, “quoted-printable”) into tContent[2] >> >> put mimeEncodeAsMIMEMultipartDocument(tContent, “alernative”) >> >> Hope that helps, >> >> Regards, >> >> Charles >> >>> On 11 Aug 2022, at 3:46 pm, Charles Warwick >>> wrote: >>> Hi Sean, >>> There is a sample stack on my website for sending an e-mail with an >>> attachment using the MIME library here: >>> https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode >>> Does that help at all, >>> Regards, >>> Charles > On 11 Aug 2022, at 2:39 pm, Tom Glod via use-livecode > wrote: Sean, Try this .. edit the script of stack "com.livecode.library.mime" there seems to be some documentation there that may help. I also found this https://livecode.fandom.com/wiki/MimeEncodeAsMIMEMultipartDocument Is that your comment? :) Hope that helps a bit. > On Wed, Aug 10, 2022 at 11:46 PM Sean Cole via use-livecode < > use-livecode@lists.runrev.com> wrote: > Hi all, > I'm struggling with this still. It's been years (since before Dec 2020) > and > I just can't get my head around it. > I have a template created in Dreamweaver that is a simple bit of HTML body > with CSS styling embedded (https://pidigital.co.uk/DeepDiveReport.html). > There is also a pdf that needs to be attached. > How do I use MimeEncodeAsMIMEMultipartDocument to make it ready to send > via > tsNetSmtpSync? > There are zero tutorials and the dictionary is devoid of any useful > information on how to use it. Google turned up nothing. In my previous > request back in 2020, Monte, the author of the MIME library, had only > referred me on to the RSC docs for MIME which is like looking for a straw > in a needle stack. When I asked at one of the 'Firesides' I was told just > to use a template and send it. But to send it, it needs to be encoded and > that's the bit that is undocumented anywhere. > Any help appreciated. > ___ > 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 > > > ___ > 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
Re: Email via IMAP with HTML body from a template
Sorry, the last line of the replacement code should have been: put mimeEncodeAsMIMEMultipartDocument(tContent, “alernative”) into tBody (It was missing the "into tBody" at the end of the line) > On 11 Aug 2022, at 4:17 pm, Charles Warwick > wrote: > > Hi Sean, > > After reading your second e-mail, I see that you don't want to use > mimeEncodeFieldAsMIMEMultipartDocument to generate the HTML version of the > e-mail body from a field as it does in that sample stack. > > If you want to create your own HTML and plain text versions of the e-mail > body, you can still use that sample stack. Simply replace the following line: > > put mimeEncodeFieldAsMIMEMultipartDocument(the long id of field > "email_message") into tBody > > With something like this: > > put “Content-Type: text/plain; charset=UTF-8” & crlf into tHeadersPlain > put “Content-Transfer-Encoding: quoted-printable” after tHeadersPlain > put “” into tBodyPlain > put tHeadersPlain & crlf & crlf & \ > mimeEncodeForMIMETransfer(tBodyPlain, “quoted-printable”) into tContent[1] > > put “Content-Type: text/html; charset=UTF-8” & crlf into tHeadersHTML > put “Content-Transfer-Encoding: quoted-printable” after tHeadersHTML > put “” into tBodyHTML > put tHeadersHTML & crlf & crlf & \ > mimeEncodeForMIMETransfer(tBodyHTML, “quoted-printable”) into tContent[2] > > put mimeEncodeAsMIMEMultipartDocument(tContent, “alernative”) > > Hope that helps, > > Regards, > > Charles > >> On 11 Aug 2022, at 3:46 pm, Charles Warwick >> wrote: >> Hi Sean, >> There is a sample stack on my website for sending an e-mail with an >> attachment using the MIME library here: >> https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode >> Does that help at all, >> Regards, >> Charles On 11 Aug 2022, at 2:39 pm, Tom Glod via use-livecode wrote: >>> Sean, >>> Try this .. >>> edit the script of stack "com.livecode.library.mime" >>> there seems to be some documentation there that may help. >>> I also found this >>> https://livecode.fandom.com/wiki/MimeEncodeAsMIMEMultipartDocument >>> Is that your comment? :) >>> Hope that helps a bit. On Wed, Aug 10, 2022 at 11:46 PM Sean Cole via use-livecode < use-livecode@lists.runrev.com> wrote: Hi all, I'm struggling with this still. It's been years (since before Dec 2020) and I just can't get my head around it. I have a template created in Dreamweaver that is a simple bit of HTML body with CSS styling embedded (https://pidigital.co.uk/DeepDiveReport.html). There is also a pdf that needs to be attached. How do I use MimeEncodeAsMIMEMultipartDocument to make it ready to send via tsNetSmtpSync? There are zero tutorials and the dictionary is devoid of any useful information on how to use it. Google turned up nothing. In my previous request back in 2020, Monte, the author of the MIME library, had only referred me on to the RSC docs for MIME which is like looking for a straw in a needle stack. When I asked at one of the 'Firesides' I was told just to use a template and send it. But to send it, it needs to be encoded and that's the bit that is undocumented anywhere. Any help appreciated. ___ 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 ___ 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
Re: Email via IMAP with HTML body from a template
Hi Sean, After reading your second e-mail, I see that you don't want to use mimeEncodeFieldAsMIMEMultipartDocument to generate the HTML version of the e-mail body from a field as it does in that sample stack. If you want to create your own HTML and plain text versions of the e-mail body, you can still use that sample stack. Simply replace the following line: put mimeEncodeFieldAsMIMEMultipartDocument(the long id of field "email_message") into tBody With something like this: put “Content-Type: text/plain; charset=UTF-8” & crlf into tHeadersPlain put “Content-Transfer-Encoding: quoted-printable” after tHeadersPlain put “” into tBodyPlain put tHeadersPlain & crlf & crlf & \ mimeEncodeForMIMETransfer(tBodyPlain, “quoted-printable”) into tContent[1] put “Content-Type: text/html; charset=UTF-8” & crlf into tHeadersHTML put “Content-Transfer-Encoding: quoted-printable” after tHeadersHTML put “” into tBodyHTML put tHeadersHTML & crlf & crlf & \ mimeEncodeForMIMETransfer(tBodyHTML, “quoted-printable”) into tContent[2] put mimeEncodeAsMIMEMultipartDocument(tContent, “alernative”) Hope that helps, Regards, Charles > On 11 Aug 2022, at 3:46 pm, Charles Warwick > wrote: > > Hi Sean, > > There is a sample stack on my website for sending an e-mail with an > attachment using the MIME library here: > > https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode > > Does that help at all, > > Regards, > > Charles > >> On 11 Aug 2022, at 2:39 pm, Tom Glod via use-livecode >> wrote: >> >> Sean, >> >> Try this .. >> >> edit the script of stack "com.livecode.library.mime" >> >> there seems to be some documentation there that may help. >> >> I also found this >> >> https://livecode.fandom.com/wiki/MimeEncodeAsMIMEMultipartDocument >> >> Is that your comment? :) >> >> Hope that helps a bit. >> >> >> >>> On Wed, Aug 10, 2022 at 11:46 PM Sean Cole via use-livecode < >>> use-livecode@lists.runrev.com> wrote: >>> Hi all, >>> I'm struggling with this still. It's been years (since before Dec 2020) and >>> I just can't get my head around it. >>> I have a template created in Dreamweaver that is a simple bit of HTML body >>> with CSS styling embedded (https://pidigital.co.uk/DeepDiveReport.html). >>> There is also a pdf that needs to be attached. >>> How do I use MimeEncodeAsMIMEMultipartDocument to make it ready to send via >>> tsNetSmtpSync? >>> There are zero tutorials and the dictionary is devoid of any useful >>> information on how to use it. Google turned up nothing. In my previous >>> request back in 2020, Monte, the author of the MIME library, had only >>> referred me on to the RSC docs for MIME which is like looking for a straw >>> in a needle stack. When I asked at one of the 'Firesides' I was told just >>> to use a template and send it. But to send it, it needs to be encoded and >>> that's the bit that is undocumented anywhere. >>> Any help appreciated. >>> ___ >>> 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 ___ 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
Re: Email via IMAP with HTML body from a template
Hi Charles I know how to add an attachment because there are tutorials on this. That is already being implemented. My question is on how to add in proper html body for the content. Does your stack show how to do that? Sean > On 11 Aug 2022, at 06:45, Charles Warwick via use-livecode > wrote: > > Hi Sean, > > There is a sample stack on my website for sending an e-mail with an > attachment using the MIME library here: > > https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode > > Does that help at all, > > Regards, > > Charles ___ 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
Re: Email via IMAP with HTML body from a template
Hi Sean, There is a sample stack on my website for sending an e-mail with an attachment using the MIME library here: https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode Does that help at all, Regards, Charles > On 11 Aug 2022, at 2:39 pm, Tom Glod via use-livecode > wrote: > > Sean, > > Try this .. > > edit the script of stack "com.livecode.library.mime" > > there seems to be some documentation there that may help. > > I also found this > > https://livecode.fandom.com/wiki/MimeEncodeAsMIMEMultipartDocument > > Is that your comment? :) > > Hope that helps a bit. > > > >> On Wed, Aug 10, 2022 at 11:46 PM Sean Cole via use-livecode < >> use-livecode@lists.runrev.com> wrote: >> Hi all, >> I'm struggling with this still. It's been years (since before Dec 2020) and >> I just can't get my head around it. >> I have a template created in Dreamweaver that is a simple bit of HTML body >> with CSS styling embedded (https://pidigital.co.uk/DeepDiveReport.html). >> There is also a pdf that needs to be attached. >> How do I use MimeEncodeAsMIMEMultipartDocument to make it ready to send via >> tsNetSmtpSync? >> There are zero tutorials and the dictionary is devoid of any useful >> information on how to use it. Google turned up nothing. In my previous >> request back in 2020, Monte, the author of the MIME library, had only >> referred me on to the RSC docs for MIME which is like looking for a straw >> in a needle stack. When I asked at one of the 'Firesides' I was told just >> to use a template and send it. But to send it, it needs to be encoded and >> that's the bit that is undocumented anywhere. >> Any help appreciated. >> ___ >> 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 ___ 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
Re: Email via IMAP with HTML body from a template
Hi Tom, The doc in the script is the same that comes up in the dictionary. No help when it comes to actually following a series of instructions that are needed to send an HTML email via tsNetSmtpSync. Basically, it only tells you the syntax, but with no help on even a few of the necessary parameters you would need to use to make proper use of it. It's like being handed the space shuttle and told "there you are, work it out for yourself"! That is my comment on Fandom. The same I asked of Monte. Neither he nor anyone else wants to answer those questions it would seem. pContentA: How do we pre-encode parts including headers? pMultipartType: What MultiPart types are there? pParamA: What kind of parameters does ParamA take? The formatting we get from converting a field to mime (MimeEncodeFieldAsMimeMultipartDocument - a ridiculously long command name btw) is horrendous. It's practically unusable, hence why I NEED to find a way to send HTML by email on behalf of our clients. On Thu, 11 Aug 2022 at 05:38, Tom Glod via use-livecode < use-livecode@lists.runrev.com> wrote: > Sean, > > Try this .. > > edit the script of stack "com.livecode.library.mime" > > there seems to be some documentation there that may help. > > I also found this > > https://livecode.fandom.com/wiki/MimeEncodeAsMIMEMultipartDocument > > Is that your comment? :) > > Hope that helps a bit. > > > > On Wed, Aug 10, 2022 at 11:46 PM Sean Cole via use-livecode < > use-livecode@lists.runrev.com> wrote: > > > Hi all, > > > > I'm struggling with this still. It's been years (since before Dec 2020) > and > > I just can't get my head around it. > > > > I have a template created in Dreamweaver that is a simple bit of HTML > body > > with CSS styling embedded (https://pidigital.co.uk/DeepDiveReport.html). > > There is also a pdf that needs to be attached. > > > > How do I use MimeEncodeAsMIMEMultipartDocument to make it ready to send > via > > tsNetSmtpSync? > > > > There are zero tutorials and the dictionary is devoid of any useful > > information on how to use it. Google turned up nothing. In my previous > > request back in 2020, Monte, the author of the MIME library, had only > > referred me on to the RSC docs for MIME which is like looking for a straw > > in a needle stack. When I asked at one of the 'Firesides' I was told just > > to use a template and send it. But to send it, it needs to be encoded and > > that's the bit that is undocumented anywhere. > > > > Any help appreciated. > > ___ > > 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 > ___ 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
Re: Email via IMAP with HTML body from a template
Sean, Try this .. edit the script of stack "com.livecode.library.mime" there seems to be some documentation there that may help. I also found this https://livecode.fandom.com/wiki/MimeEncodeAsMIMEMultipartDocument Is that your comment? :) Hope that helps a bit. On Wed, Aug 10, 2022 at 11:46 PM Sean Cole via use-livecode < use-livecode@lists.runrev.com> wrote: > Hi all, > > I'm struggling with this still. It's been years (since before Dec 2020) and > I just can't get my head around it. > > I have a template created in Dreamweaver that is a simple bit of HTML body > with CSS styling embedded (https://pidigital.co.uk/DeepDiveReport.html). > There is also a pdf that needs to be attached. > > How do I use MimeEncodeAsMIMEMultipartDocument to make it ready to send via > tsNetSmtpSync? > > There are zero tutorials and the dictionary is devoid of any useful > information on how to use it. Google turned up nothing. In my previous > request back in 2020, Monte, the author of the MIME library, had only > referred me on to the RSC docs for MIME which is like looking for a straw > in a needle stack. When I asked at one of the 'Firesides' I was told just > to use a template and send it. But to send it, it needs to be encoded and > that's the bit that is undocumented anywhere. > > Any help appreciated. > ___ > 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
Email via IMAP with HTML body from a template
Hi all, I'm struggling with this still. It's been years (since before Dec 2020) and I just can't get my head around it. I have a template created in Dreamweaver that is a simple bit of HTML body with CSS styling embedded (https://pidigital.co.uk/DeepDiveReport.html). There is also a pdf that needs to be attached. How do I use MimeEncodeAsMIMEMultipartDocument to make it ready to send via tsNetSmtpSync? There are zero tutorials and the dictionary is devoid of any useful information on how to use it. Google turned up nothing. In my previous request back in 2020, Monte, the author of the MIME library, had only referred me on to the RSC docs for MIME which is like looking for a straw in a needle stack. When I asked at one of the 'Firesides' I was told just to use a template and send it. But to send it, it needs to be encoded and that's the bit that is undocumented anywhere. Any help appreciated. ___ 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