From: Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject: Re: Sending HTML e-mail
Date: Tue, 26 Jan 2016 21:29:12 -0500
Date: 2016-01-26T21:29:12-05:00 [thread overview]
Message-ID: <s8agab1te5nufarlp89ede1ijl2o0t38cp@4ax.com> (raw)
In-Reply-To: f50a10f0-133a-4394-b350-5e229cd27bdd@googlegroups.com
On Tue, 26 Jan 2016 15:18:47 -0800 (PST), John Smith
<yoursurrogategod@gmail.com> declaimed the following:
>I'd like to e-mail something like this as a first go:
>
><html><head><title>foo</title></head><body><p>bar</p></body></html>
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/
next prev parent reply other threads:[~2016-01-27 2:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-24 4:25 Sending HTML e-mail John Smith
2016-01-24 16:12 ` Dennis Lee Bieber
2016-01-26 1:09 ` Randy Brukardt
2016-01-26 23:09 ` John Smith
2016-01-26 23:18 ` John Smith
2016-01-26 23:18 ` John Smith
2016-01-27 2:29 ` Dennis Lee Bieber [this message]
2016-01-28 0:14 ` Randy Brukardt
2016-01-28 3:11 ` John Smith
2016-01-28 21:42 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox