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. | Community
Skip to main content
New Participant
April 18, 2017
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.

  • April 18, 2017
  • 3 replies
  • 2723 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by vraghav

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.html#Overall_recommendations

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

Regards,

Vipul

3 replies

New Participant
May 31, 2019

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

Amit_Kumar
New Participant
April 22, 2017

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

vraghav
vraghavAccepted solution
Employee
April 18, 2017

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.html#Overall_recommendations

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

Regards,

Vipul