How can Email Template be created in unit tests?

Can I create an Email Template as part of the unit test? If yes, how?


Unfortunately at this time there isn’t any support for creating Email Templates anywhere in APEX, which is the case for most metadata objects. For the most part these can only be manipulated through the browser or the metadata API.

Update this is now possible (see the other answers for more details)

Source : Link , Question Author : ipavlic , Answer Author : Ralph Callaway

Leave a Comment