I really appreciated your assistance
thanks a lot
No need to re-invent the wheel. Just use the good ole smtpmail.p by Free Framework.
Almost forgot, http://freeframework.sourceforge.net/downloads/accepted/