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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable 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!feeder.eternal-september.org!news.glorb.com!Xl.tags.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Tue, 26 Jan 2016 20:28:37 -0600 From: Dennis Lee Bieber Newsgroups: comp.lang.ada Subject: Re: Sending HTML e-mail Date: Tue, 26 Jan 2016 21:29:12 -0500 Organization: IISS Elusive Unicorn Message-ID: References: <7f2111a7-a789-42c9-829b-08c2661410bd@googlegroups.com> X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 108.68.177.68 X-Trace: sv3-Rcuf1HQEbRj7CXkvLvToi6i+p8ivz2odLpjA6YhwT0TEbab/ntYIdt/lo4CfHzXccz6zoDEdL6Owpuz!qTahjdXe9joBIAg4mW8xjP9cXCzftxxRg/IOfOBAxgoxztJYdMeJ3CKQV8gdqQO7a1lAnyTQlT+O!xSIy63IH3O4fzcjU+n2ISDnQzyM= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 3330 Xref: news.eternal-september.org comp.lang.ada:29253 Date: 2016-01-26T21:29:12-05:00 List-Id: On Tue, 26 Jan 2016 15:18:47 -0800 (PST), John Smith declaimed the following: >I'd like to e-mail something like this as a first go: > >foo

bar

I've never used AWS so this is all coming from web searches... https://docs.adacore.com/aws-docs/aws/apiref.html#aws-smtp-client Bottom of the section has... > procedure Send > (Server : Receiver; > From : E_Mail_Data; > To : Recipients; > Subject : String; > Attachments : AWS.Attachments.List; > Status : out SMTP.Status; > CC : Recipients := No_Recipient; > BCC : Recipients := No_Recipient); > -- As above but takes an attachment list which support complex attachments > -- like multiplart/alternative. Which should allow you to embed your HTML as one of the /alternative/ representations (I need to find the docs on the attachments.list...) https://docs.adacore.com/aws-docs/aws/apiref.html#aws-attachments > function Value > (Data : String; > Name : String := ""; > Encode : Encoding := None; > Content_Id : String := ""; > Content_Type : String := MIME.Text_Plain) return Content; > -- A string as content So... I'd presume you'd pass your HTML string as Data, specify MIME.Text_HTML... > type Alternatives is private; > > procedure Add > (Parts : in out Alternatives; > Data : Content); > -- Add an alternative content > Then add it to the actual message with... (well, actually -- first add it to an Alternatives structure...) > procedure Add > (Attachments : in out List; > Parts : Alternatives); > -- Add an alternative group to the current attachment list ... then add it to the "attachments" list, and THEN use the above Send... -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/