0

How can we make email that is being created by the ExactTarget API using .NET pick a layout from ExactTarget to go around the HTML body?

Here is my sample code for the new email:

var email = new Email {
  CustomerKey = CorrelationId,
  Name = _name,
  Subject = subject,
  HTMLBody = content,
  CharacterSet = "iso-8859-1",
  EmailType = EmailType.HTML.ToString(),
  CategoryID = EmailCategoryId,
  CategoryIDSpecified = true,
  CreatedDate = DateTime.Now,
  CreatedDateSpecified = true
};
0

Currently, there is no Template property on an Email so it isn't possible to relate an Email created through the API to a Template. It would however be possible to retrieve an existing Template then use the LayoutHTML property in order to get the HTML which could then be used when creating the Email.

| improve this answer | |
  • Can you please send me a .NET sample code to retrieve the template and use it while creating a new email.Can I use the layout and set the content when creating the email?. – Anu Apr 21 '14 at 14:46
  • Please share what code you are currently trying for this. – Mac Apr 22 '14 at 11:54
  • I dont see LayoutHTML property for Email object.How do we set the Layout here.var email = new Email{ CustomerKey = CorrelationId, Name = _name, Subject = subject, HTMLBody = content, CharacterSet = "iso-8859-1", EmailType = EmailType.HTML.ToString(), CategoryID = EmailCategoryId, CategoryIDSpecified = true, CreatedDate = DateTime.Now, CreatedDateSpecified = true}; – Anu Apr 22 '14 at 14:23
  • On the Email Object, it would be HTMLBody – Mac Apr 22 '14 at 14:33
  • There does not exist LayoutHTML property on Email object for version 0.9. – sammarcow Mar 21 '16 at 18:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.