I'm trying to capture the emails subject in the send log. Is there any way for me to do this?

To the 'experienced' community members: Not sure how to rephrase this any better. Maybe you could tell me what exactly is unclear so I can clarify. Yet I'll try anyway.

I created a send log Data Extension with the following Fields:

JobID, ListID, BarchID, SubID, TriggeredSendID, ErrorCode, view_email_url.

I'd like to add another field like, 'subject' which represents the subject of the particular email being logged / sent. However, I am unable to capture that information. It doesn't look as if any of the personalization strings can be used.

@Kelly-J-Andrews hints at the ability to do this in the comment on the this answer.

  • I have reopend the question, do understand that some effort is expected to be put into a question. Your update has made it clear that this is about the marketing cloud, so i've taken the liberty to add that to your question (tag). Commented Jan 20, 2015 at 15:46

1 Answer 1


As previously suggested, you could use an AMPScript variable for your subject.

var @subject 
set @subject = "This is the subject" 

In your send definition the subject would be: %%=v(@subject)=%%

In your Send Log DE, you'd have to have a column named "subject"

If you'd rather not use the Send Log and email scripting, the subject is available in the System Data Views and is accessible via Query Activity.

For a particular send, you can query the EmailSubject and DynamicEmailSubject columns. I'd recommend building your query starting with _Job and then inner joining to _Sent based on the JobID (aka the SendID from the Tracking tab). I typically use _Job.PickupTime to narrow it down by date. Something like this:

, j.EmailSubject
, j.DynamicEmailSubject
, s.SubscriberKey
, s.EventDate
from _job as j with (nolock)
inner join _sent as s with (nolock) on (s.jobid = j.jobid)
where j.pickuptime >= dateadd(day,-7,getdate())

You can also join this back to your Send Log if you'd like (by JobID).

  • 2
    Since adding the subject to the send log directly seems to be unsupported and a hack -- I'm going to attempt to get the data as you suggest by a Query Activity. So far, here is the query I have: select asl.IID , asl.view_email_url , j.DeliveredTime SendDate , j.EmailSubject Subject from ArchiveSendLog asl inner join _job j with (nolock) on (asl.jobid = j.jobid)
    – VFein
    Commented Jan 20, 2015 at 19:49
  • That works. Setting the subject line with scripting is not as uncommon as you might think. It happens quite a bit in multi-lingual emails. Commented Jan 20, 2015 at 19:55
  • Makes sense, do you know if the EmailSubject column of the _job system view will contain the dynamic subject line or the ampscript?
    – VFein
    Commented Feb 13, 2015 at 5:20
  • It'll contain the AMPScript, yes. Commented Feb 13, 2015 at 11:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .