Skip to main content
added 11 characters in body
Source Link
Gravitai
  • 2.9k
  • 1
  • 10
  • 19

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 -

  1. Create a Data Extension, with an unlimited text Field.

    Create a Data Extension, with an unlimited text Field.
  2. 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 Extension
  3. Retrieve 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 ]%%

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 -

  1. Create a Data Extension, with an unlimited text Field.

  2. Add Ampscript in your Template/Email to Log the HTML into the Data Extension

  3. Retrieve 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 ]%%

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.

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 -

  1. Create a Data Extension, with an unlimited text Field.
  2. Add Ampscript in your Template/Email to Log the HTML into the Data Extension
  3. 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 ]%%
Source Link
Gravitai
  • 2.9k
  • 1
  • 10
  • 19

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 -

  1. Create a Data Extension, with an unlimited text Field.

  2. Add Ampscript in your Template/Email to Log the HTML into the Data Extension

  3. Retrieve 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 ]%%

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.