There is a convenience function which allows any pimcore system component or plugin to use a preconfigured Zend_Mail instance based on the pimcore system settings' email conifguration.
//returns Zend_Mail
$mail = Pimcore_Tool::getMail($recipients,$subject);
For any plugin or website applications it might be convenient to use this mail configuration instead of having to care for these settings themselves.