Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

provide a web service which can recreate the sent messages using message template and campaign data and return it in a HTML or file formats.

karthick_ap
Level 1
Level 1

We need to provide a web service which can recreate the sent messages using message template and campaign data and return it in a HTML or file formats. Is this possible? If yes, how?

1 Accepted Solution
Vapsy
Correct answer by
Employee
Employee

Hi Karthick,

Why not use the available feature in Campaign i.e. email archiving.

https://docs.campaign.adobe.com/doc/AC6.1/en/INS_Additional_configurations__Email_deliverability.htm...

Search for term bcc and it will give you an idea where campaign creates a copy EML for every message sent. 

Regards,

Vipul

View solution in original post

3 Replies
Vapsy
Correct answer by
Employee
Employee

Hi Karthick,

Why not use the available feature in Campaign i.e. email archiving.

https://docs.campaign.adobe.com/doc/AC6.1/en/INS_Additional_configurations__Email_deliverability.htm...

Search for term bcc and it will give you an idea where campaign creates a copy EML for every message sent. 

Regards,

Vipul

View solution in original post

Amit_Kumar
Community Advisor
Community Advisor

Hi,
 
In case you have generated the mirror page on your email, then you can retrive the html data using a custom code.

write the following code as a javascript method and enable that as a  web service either using jssp page or via soap method in a schema.
 

//--------------------------------------------------------------------------- // function to build html delivery mirror page //--------------------------------------------------------------------------- function genrateDeliveryHtml(delivery, serverURL) { var sg = new StringGroup("nms:campaign"); if( String(delivery.mapping.storage.@broadLogSchema) == "" ) return "<p>" + sg.noRenderingLabel() + "</p>" // Collect broadlogs which come from last proofed delivery var queryBroadLog = xtk.queryDef.create( < queryDef schema={delivery.mapping.storage.@broadLogSchema} operation="select" lineCount="5"> < select> < node expr="@id"/> < node expr="[@delivery-id]"/> < node expr="[delivery/properties/@midRemoteId]"/> < node expr="@address"/> < node expr="[delivery/@mirrorURL]"/> < /select> < where> < condition expr={"[delivery/@proofedDelivery-id]="+delivery.@id}/> < condition expr={"@status IN ("+DELIVERY_STATUS_SENT+","+DELIVERY_STATUS_TOSENT+")"}/> < /where> < orderBy> < node expr="[delivery/@lastModified]" sortDesc="true"/> < /orderBy> < /queryDef>) var iCompt = 0 var strHtmlContent = "" var broadLogList = queryBroadLog.ExecuteQuery() var strBroadLog = delivery.mapping.storage.@broadLogSchema.toString() strBroadLog = strBroadLog.substring(strBroadLog.indexOf(':')+1) // Calculate mapping suffix var iDeliveryId = 0 for (var i=0; i<broadLogList[strBroadLog].length(); i++) { var eBroadLog = broadLogList[strBroadLog][i] var strUrl = eBroadLog.delivery.@mirrorURL if ((strUrl == "" || strUrl == undefined) && serverURL != "") strUrl = serverURL strUrl += "/nl/jsp/m.jsp?c=" var iCurrentDeliveryId = eBroadLog.delivery.properties.@midRemoteId if (iCurrentDeliveryId == 0) iCurrentDeliveryId = eBroadLog.@["delivery-id"] if (iDeliveryId != 0 && iDeliveryId != iCurrentDeliveryId) break else if (iDeliveryId == 0) iDeliveryId = iCurrentDeliveryId // Show mirror page links if delivery is not in midsourcing if (strHtmlContent != "") strHtmlContent += "<br/>" strHtmlContent += "<img src='"+serverURL+"/xtk/img/html.png' border='0' style='vertical-align:middle'/>" strHtmlContent += " <a target='_blank' class='linkProcess' href='"+strUrl+'{'+simpleRevCrypt(iDeliveryId, eBroadLog.@id)+"}'>"+sg.previewHTMLLabel(eBroadLog.@address)+"</a>" } return strHtmlContent }

alternatively, If you wish to keep a copy of every email sent from your system, you will have to buy a feature called Email archiving. Please read more about id by reading the documentation Email deliverability.(https://forums.adobe.com/thread/2224900)
 
This is a paid feature and can have increased load on your MTA. It will generate EML files for every email sent which you can then export using sftp to a server of choice and then use on your web application.
 

Regards,
Amit

kumar451
Level 2
Level 2

Hi Karthick,

I have the same requirement for my client to recreate the same email content sent to the customer and store it in a file for retrieval purpose.

Were you able to recreate the content and return in HTML files?

If yes, Can you please let me know the details ..

Thanks,Kumar