Maddy, You should be sending emails anytime the "Build" fails, doesn't matter if it is failing at compile, or any tests you have, or whatever. DO NOT LIMIT it to compile. Just because code compiles does not make it right.
Here is the link to docs and here is an example
<email from="[email protected]" mailhost="yourmailserver.com" includeDetails="True">
<users />
<groups>
<group name="buildmaster" notification="failed"/>
</groups>
<converters>
<regexConverter find="DOMAIN\\" replace="" />
<regexConverter find="$" replace="@yourcompany.com" />
</converters>
<modifierNotificationTypes>
<NotificationType>Failed</NotificationType>
</modifierNotificationTypes>
</email>