1

Can anyone post the correct XML for retrieving an Email folder using ANT?

Thx.

1

Email template can't be fetched with wildcard as we can do for other component so you need to specify the folder name in which you have your email template

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
  <types>
   <members>unfiled$public/EMAILTEMPLATENAME</members>
   <members>EmailTemplates/EMAILTEMPLATENAME</members>             
   <name>EmailTemplate</name>
  </types>
 <version>28.0</version>
</Package>

it may be a tedious task to read all email template name and create package.xml out of it so for that purpose you can use eclipse IDE to generate package.xml for you

enter image description here

enter image description here

after completing both steps you can copy package.xml in your ant folder.

| improve this answer | |
  • I know how to retrieve the templates, what I am struggling with is the Folder itself. I have created a new folder with 4 new templates, and the retrieval of the template is working fine, but the folder is not being retrieved. That is leading to a deployment failure because I am trying to deploy templates to a non-existent folder. Thx. – Mike Lankfer Jan 7 '16 at 18:00
  • you need to create folder in your target org first. that is the manual process – Himanshu Jan 7 '16 at 18:04

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