From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "G.B." Newsgroups: comp.lang.ada Subject: Re: Sending HTML e-mails Date: Thu, 28 Jan 2016 17:52:20 +0100 Organization: A noiseless patient Spider Message-ID: References: <7b8c5605-a4b5-4c0a-ae52-399b34b1be9e@googlegroups.com> <9a1dd159-be38-4ab2-82ea-8b73b59ca247@googlegroups.com> Reply-To: nonlegitur@futureapps.de Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 28 Jan 2016 16:49:32 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="b96887e80893c84a90c3007226ca0d1c"; logging-data="15131"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/4ospVhv0YTLxrN5Ds2WLKQldzeupee0k=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 In-Reply-To: <9a1dd159-be38-4ab2-82ea-8b73b59ca247@googlegroups.com> Cancel-Lock: sha1:qAkuLMqoySB1Q9Iruj9NTjF0I7w= Xref: news.eternal-september.org comp.lang.ada:29274 Date: 2016-01-28T17:52:20+01:00 List-Id: On 28.01.16 04:22, John Smith wrote: > On Monday, January 25, 2016 at 4:37:28 AM UTC-5, Georg Bauhaus wrote: >> On 24.01.16 05:24, John Smith wrote: >>> So, I have this question. How can I create a plain table in HTML and then send it out? >> >> Set the MIME type header accordingly. >> >> -- >> "HOTDOGS ARE NOT BOOKMARKS" >> Springfield Elementary teaching staff > > It seems that I have started two threads at the same time by accident. > > I'm curious, which header should I set? I've looked over AWS.MIME and tried setting a Data object which is generated by AWS.Response.Build(), but this has not been very fruitful. I think the response given by Dennis Lee Bieber had some good hints. A function I found around here has Result : AWS.Attachments.List; and then produces a list of attachments to be the mail body. It includes these statements: Result.Add (Name => "SpecificInfo", Data => Value (Data => Raw_Input, -- yes, raw Encode => Base64, Content_Type => AWS.MIME.Text_Plain & "; charset=UTF-8")); Result.Add (Name => "GenericInfo", Data => Value (Data => Generic_Info, Encode => Base64, Content_Type => AWS.MIME.Text_Plain & "; charset=UTF-8")); This may explain some headers, I think, even though that's going to be a MIME message. Last time I needed to send HTML-only mail was in Perl, so I don't have this handy for Ada. (HTML-only mail is certainly what many marketeers seem to want. The assumption is that HTML gets them better links, with tracking not too visible. The mail show information before the user has clicked on some teaser that makes him or her a subject of user research at the sender's web site. Also, HTML-only mail can rely on colorful, graphical design as one of the classical means of persuasion. (Javascript programs would be added, too, if recipients were ever to start accepting that again in eMail, and if mail filters wouldn't mark these as spam.))