Previewable email templates token replacement
Put the token [webform:sid] in template

Use
function mymodule_pet_substitutions_alter(&amp;$substitutions, $params) {
$substitutions['webform'] = array('sid'=> {value});
}