I'm facing the very same challenge - and options suggested by SF was to use their archival service (or do a BCC on send).
One possible solution I've found -
Create a Data Extension, with an unlimited text Field.
Create a Data Extension, with an unlimited text Field.Add Ampscript in your Template/Email to Log the HTML into the Data Extension
Add Ampscript in your Template/Email to Log the HTML into the Data ExtensionRetrieve the HTML from the data extension using API (or flat file extract if needed)
%%[ IF _messagecontext == "SEND" AND jobid > 0 THEN set @HTML = HTTPGet(view_email_url) InsertDE("EmailHistory", "JobID",jobid, "SubscriberKey",_subscriberkey, "EventDate",NOW(), "HTML",@HTML ) ENDIF ]%%
Retrieve the HTML from the data extension using API (or flat file extract if needed)
In addition, using SQL & Automation you can combine the result from the data extension with the results of the _Sent and _JobID tables if desired.
%%[
IF _messagecontext == "SEND" AND jobid > 0 THEN
set @HTML = HTTPGet(view_email_url)
InsertDE("EmailHistory",
"JobID",jobid,
"SubscriberKey",_subscriberkey,
"EventDate",NOW(),
"HTML",@HTML
)
ENDIF
]%%
To get around the HTTPGet from executing/counting as an open, then also add :
%%[ IF _messagecontext == "SEND" OR _messagecontext == "VAWP" THEN ]%%
<custom name="opencounter" type="tracking">
%%[ ENDIF ]%%