you may found this code in to the tools.misc.py file enables user to send the emails, because of its written for the specific purpose, the limitation of this facility is we can not send the file attachment, can not get the statistic regarding the email sent, and while configuration of the user, password and smtp-server we not get the confirmation like its configured successfully. more over ts better if we put the security on the email sending facility, like only authorized user can send the email.
To get all this facility you can use the a new module which is specifiably designed to manage the email address. You can get this module from the https://svn.tinyerp.com/svn/extra_addons/trunk/smtpclient smtpclient is the module name which install the SmtpClient, History, Objects related to the Statistic for email sending.
More over this module is just used for the configuration by the System Administration, and used by the Tiny Developers, for example developers want the functionalities like when user confirm the Sale Order or Invoice that will be also be deliver to used via Email Immediately. then this provides the surety of the email delivery. because while configuration of the Email Address it performs 2 way checking, first is tiny can send the successfully able to send the email from the provided email address, and second things is when ever content send to recipient that also verify by the Verification code.
System Administrator configure the email address, and ask for the verification, the Verification process send the random generated key to the supplied email address, and after that user have to verify that email address by supplying the verification code. after that all user which have the access to this email address they can send the email using this address.
SMTP Client provides an enhancements to the existing modules like its great if we can send the Sale Order copy in email to the Customer immediately after confirmation of the Sale Order. or Send the Delivery Notes to the Customer after confirmation of the Picking. this kind of functionalities will be available in the extra_addons.