Emailing a CCK node using drupal_mail()
I'm working on a site that has ten or so custom content types. Many of these content types have a large number of fields (up to fifty). Some of these fields are shared across content types, while others are not.
I'm writing a custom module that aims to email a user whenever they create a node of one of these types. I want the email to contain the full text of the node. By borrowing code from http://drupal.org/project/forward I've been able to sort out the basics, but I am now staring at the prospect of writing a custom .tpl.php file which displays every single one of the custom fields, dependant on whether that field exists in the node type in question.
Before I being this mammoth, mind-numbing task, I thought I'd better check whether there was an easier way to achive what I want to achieve - is there, for example, a simple way to parse through every single CCK custom field? Or is there a variable already defined which will contain the entire content of a node, including CCK custom fields?

the $node variable contains
the $node variable contains all node content AND CCK content values as well.
$node = node_load($nid);
var_dump($node);
Yes, of course: but how can I
Yes, of course: but how can I avoid having to print $node->field_custom['view'][0] for every one of my fields when sending an email?
For example, if I create a new CCK field then it will be displayed automatically in the full node view, without me having to make changes to node.tpl.php - the position of the field is handled by CCK. How do I emulate this functionality in the email that I send?
It would be nice to CCK a
It would be nice to CCK a part of more core functionality, so that as you state a custom tpl.php is not required. Perhaps it's part of 7. Perhaps work with views? Sorry, can't be of any extra help.
node_view()
<?php$node = node_load($nid);
print node_view($node);
?>