I don't know about KDE 3.1 (stable), but in KDE 3.2 (CVS actually) this is an option. Choose: Settings -> Configure Kmail -> Network -> Receiving and look in the "New Mail Notification" box for a "System Tray Notification" check box. If that's available, turn it on and then when you click it, it will show and hide KMail.
Hope that helps
Breaking Windows isn't just for kids anymore...
Got KDE?